Embed Office Online (Word, Excel, Powerpoint) in iframe - iframe

I am looking for a way to embed Office Online editors in an iframe. I need https://portal.office.com/ as the src of the iframe, but that does not seem to work.
Then I thought I could maybe embed an empty document in there and have it be saved as a new file upon use. This does not seem to be possible however, as embedded documents are presented as read-only.
Does anybody know how to embed any of the Office Online editors in an iframe?
I've used this fiddle to tinker around in jsfiddle.net/n7e3wv6v/33

Yes I think it can be done with the following code, src document must be public and a extension known by office (docx, xls ...) :
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>
This is an embedded
<a target='_blank' href='http://office.com'>Microsoft Office</a>
document, powered by
<a target='_blank' href='http://office.com/webapps'>Office Online</a>.

Related

Download links in Blazor

I'm programatically creating links to download files of different formats like .csv and .yml.
My code is
<a href="/organs/#organ/#policy/#folder.Name/#file.Name" download>#file.Name</a>
so lets say these links get created:
https://localhost:44372/organs/Heart-Lung/03-15-2020/data/fakedata.yml
https://localhost:44372/organs/Heart-Lung/03-15-2020/data/testdata.csv
the .csv works as it should, I click and it downloads. the .yml however opens a new web page at that link and then says that it can't be found
I'm really not sure what I'm doing wrong, is there a way force it to download or should I be doing this a different way?
I ended up using javascript to do this, based on https://wellsb.com/csharp/aspnet/blazor-jsinterop-save-file/
most of the code is the same, but I changed the link to this to pass in the variable and to keep it as a clickable link that doesn't go anywhere
<a href="javascript:void(0)" #onclick=#(() => DownloadFile(file.FullName))>#file.Name</a>

How to add background music in asp.net without bgsound and embed

How to add background music when a website loads for the first time without using embed and bgsound.I am using visual studio 2010 and these two are not supported in this.
I am developing website using master page and i want to use the code in master
page.
What is the best practice to to be able when I open my website and some music starts f sometime.I am not much expert in .net with c#.So finding some problem in it.
If browser also matters?
Regards,
suparna
Add the following code anywhere in the body of your HTML document to embed a music file and play it automatically when a visitor browses your website.
<audio src="music/yoursongname.mp3" autoplay="autoplay" loop="loop"></audio>
Change the "src" attribute so that it contains the path and filename of the music file that you want to embed.
Note: Add the "loop" attribute if you want the music file to play over and over

Embed Code in Drupal

I am not familiar with Drupal but our clients report that what we provide as embed isn't working with drupal.
Our embed code will be
<iframe id="ivideoframe" src="https://mywebsite/Player.aspx?q=IsahXh4JBPTq9sc%252b2j4zmaJvfFIagPpqAIBQIZpQTGUxPzzL8g44uVrsRGGRbDnSk5IO3kBeGI%252b211on7BfXBL6UjrXe%252fI%252bhftSaavtHay8%253d" height="419" width="665" toolbar="no" scrolling="no" frameborder="0"></iframe>
What I understand from client is the query string letter "?q" has some issue with drupal. Can some one help me to understand how this code will result in error when used in drupal?
If you are putting this embedded code into a block, or a CCK field of some sort (body, text, etc), you'll want to make sure that the "Text Format" is set to either Full HTML or one that allow the use of full html.
Even Full HTML can sometimes be buggy with iFrame's, I've found. We've found the best practice is to actually create your own Text Format called "Raw HTML" that allows everything and doesn't try to format things at all. You can create it at [Admin --> Configuration --> Content authoring --> Text Formats].
Then once you've created the format, simply choose that custom format on the field that contains the iFrame embed code.

Fake a flash link with CSS?

We have a .swf file that was created by an external marketing agency some years ago...
300px X 600px ... it has an embedded link to a PDF that they also created..
We want to link to another PDF file that is more marketing friendly...
Is there a way to fake, using CSS, a link to this new PDF?
We have ceased contact with the old marketing agency and never had the original .fla file to edit.
I was thinking I could add a over the flash file...and somehow create an class for an a href to equal the size of the and link to this PDF...
Sound feasible?
Unless the file is encrypted, it's probably much easier if you use an swf decompiler and extract the pdf from there. Try SWFTools .

Display Word Document inside ASP.Net page

I want to display a word Document, which is sitting on my IIS. I want to display the whole document as is, inside a iFrame on my aspx page.
I know I can use MS Word Libs, but I cannot install Word on Server where application will be hosted, (Correct me if I am wrong: I cannot use just dlls without installing MS Word on Server).
How can I display the word document in my iFrame?
Probably the easiest way would be to include the Google Docs Viewer.
Other ways could be to use Aspose.Words (commercial) to convert Word to PDF and then use Aspose.Pdf.Kit to convert PDF to images and then display the images online.
PowerTools for Open XML contains an open source, free implementation of a conversion from DOCX to HTML formatted with CSS. The module HtmlConverter.cs supports all paragraph, character, and table styles, fonts and text formatting, numbered and bulleted lists, images, and more. See http://bit.ly/1bclyg9

Resources