We would like to display excel file which consist of graphs onto our HTML5 web page.
I tried couple of approach but haven't got exact solution-
If I used iframe then source excel file opens as an attachment and dialog box appears. which I dont want.
If I convert excel file into mht and then open using iframe. This only works with IE and not mozilla or chrome.
Can anyone please suggest how to view entire excel workbook on my HTML5 page?
Note: I do not want to use google docs in my case.
Check out this link: http://www.labnol.org/software/embed-tables-spreadsheet-data-in-websites/7435/
It has multiples ways of embedding spreadsheets into html pages
Related
I am working on a project which requires me to add a chart store in HTML file into excel. The MS web browser Active X control does not allow me to add a web browser. If I do that using VBA, it gives me some error related to not displaying Active Content. Please provide me some assistance on this. I have used IE object in VBA, but it opens the HTML file in IE.
The best way to do this would be to take the Microsoft web browser app and insert it into excel cells. This will allow you to insert the HTML.
Please note excel is not made to handle HTML and as such you won't be able to go in-depth with you HTML. Rather use different programs like MT Blocks to get the desired result.
https://www.mrexcel.com/board/threads/html-into-excel.387722/
i am looking for a creative solution for a new task.
my issue is we need a way to preview local files (extentions: doc, docx, ppt, pptx, pdf, tif, jpeg) in a frame or so of a different web page which provides a link.
preview should look like an image of the files or so.
we would like to prevent parsing the files to pdf in order to save time...
we are using angular 7, c# asp.net server side.
we are very limitted in most solutions, as the data is very secure and is used in an inner office net,
that is why we can't use the google docs solution.
i also understood that using iframe tag and pointing it src attribute to the file source doesn't load the page due to security resones.
in addition all users has the ability to preview the above files types when they do it straight from the document by the open with -> IE or other browsers options.
i tried :
<iframe src="file:///C:/Users/cd/Downloads/MyFile.docx"></iframe>
but:
the iframe tag doesn't open the doc file, i can see the iframe in the DOM as a new html but it doesnt have a content of anything
i tried also for images and the same, the frame is blank
If you are using chrome then chrome specifically blocks local file access this way for security reasons.
more detail is this link : here
One possible solution is, render the document pages as images and then display them on the web page i.e. using the iframe.
You may use GroupDocs.Viewer for .NET for rendering the document pages into high-fidelity images (PNG/JPG). You can then embed the images into your web page to preview the document. This is how you can get the image representation of the pages in a Word document:
using GroupDocs.Viewer.Options;
// Set output path
string OutputPagePathFormat = Path.Combine("D:\\output", "page_{0}.png");
// Render document pages
using (Viewer viewer = new Viewer("D:\\sample.docx"))
{
PngViewOptions options = new PngViewOptions(OutputPagePathFormat);
viewer.View(options);
// Rendered images will be saved in the D:\output\ directory.
}
Disclosure: I work as a developer evangelist at GroupDocs.
I'm using Microsoft's One Drive to share an Excel workbook by embedding it into a web page using the iframe tag.
I've got the code that One Drive provides and it displays fine on the page. However, it's possible for a user to click the icon in the black bar at the bottom and view the Workbook full screen.
I don't have a problem with that, but it then gives the option to download, copy and share the entire file and that is a problem.
I've found parameters that can be used with the workbook link such as wdHideGridlines, but is there anything that will get rid of that black bar? Or anything that will stop someone downloading the file?
It seems that you can embed a file with OneDrive and it's open for all, or you can use the 'share' option and get a view-only link, but I can't seem to embed that link - it displays an Excel icon for the workbook rather than a view of the data.
I hope this makes sense, if anyone can help I'd be grateful.
At the moment, the only way to prevent the download is to hide the download command on the web page with CSS.
Cast your vote in this user voice idea. https://excel.uservoice.com/forums/274580-excel-online/suggestions/19274656-remove-the-download-option
If it gets sufficient votes, Microsoft will consider implementing it.
I have created the PDF file programmatically. For this, I have used the HTML to PDF converting library. In my PDF there are some links for some pages of website.
I have implemented the html by following way and then converted it to PDF programmatically.
<a target="_blank" href="http://mywebsite_url_here.html">Link</a>
But when opening this PDF into chrome or firefox browser and clicking on the any link exist in PDF. Links are opening is same TAB instead of the new TAB. Please help to find out the solution for this. so that my PDF reside in one tab and link will open in another tab in browser.
I have already tried
target="_blank"
target="_top"
<a onclick="window.open ('http://mywebsite_url_here.html', '');
return false" href="javascript:void(0);"></a>
But nothing has worked for me.
Short answer: It is not possible in a cross-plattform, guaranteed-to-work way.
Long answer: Hyperlinks in a PDF are different from Hyperlinks in HTML. PDF was not designed to be viewed as part of a browsing experience. Hence there is no option available for PDF Hyperlinks to open them in a new tab, because PDF does not know about the concept of tabs.
There is some discussion in Adobe's forums about it, which boils down to „not directly possible, but you could embed JavaScript in the PDF to do it“. They give an EPS file as example:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 100 100
%%EndProlog
[ /Rect [ 0 0 100 100 ]
/Action << /Subtype /JavaScript /JS (app.launchURL\("PLACE-YOUR-URL-HERE", true\);) >>
/Subtype /Link
/ANN pdfmark
%%EOF
Now before you try and get this EPS file embedded in your PDF, be aware that Chrome's PDF viewer has very little support for embedded JavaScript, so it is not guaranteed to work. It may also issue a warning to the User that there is JavaScript code going to be executed if they click on it. I would say it isn't worth the hassle.
When I save a page from my website, I will get an html file and a folder that contains all photos, css and js files.
Is there a way to save only the html file?
I've just found that if you are using Google Chrome you can choose which one you want to save from the dropdown menu 'Save as type'. If you talk about preventing the user to save your HTML - it's not possible, if the browser can see the page, the user can view the source code and save the page.
If you use Microsoft Edge browser, do the following: ctrl+s then select html only on the drop-down menu.
you will get one html file without any extra folders.