cancel
Showing results for 
Search instead for 
Did you mean: 

open excel-file including macros in browser

Former Member
0 Kudos

Hallo,

I want to open an excel file which includes macros and buttons in the browser.

Excel files without macros I loaded in the following way:

1. save file as xml (macros get lost here)

2. fileupload and save data in xml_data

3. open as object in html

                
<object id      = 'myexcel'
        classid = 'CLSID:0002E510-0000-0000-C000-000000000046'>
  <PARAM NAME='DataType' VALUE='XMLDATA'>
  <PARAM NAME='XMLDATA'  VALUE='<%= xml_data %>'>
</object>

It is possible to do it in the following way. But then it is not inline.


<script type='text/javascript'>

        var exApp = new ActiveXObject("Excel.Application");
        exApp.Visible = true;
        exApp.Workbooks.Open("C:/path/file.xls");

</script>

Has anybody an idea how to open an file including macros in the browser (inline)?

Guido

Accepted Solutions (0)

Answers (2)

Answers (2)

athavanraja
Active Contributor
0 Kudos

if its just that excel file alone in the BSP page , just set the MIME type of your BSP page to <b>application/vnd.ms-excel</b>.

This will open the Excel within the browser.

Regards

Raja

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I am doing your first approach and I am able to maintain my macros.

I didn't create the spreadsheet or the macros (just the BSP part) so I will have to ask the person who did the other part.

We are on Office 2003. Our macros are stored within the spreadsheet, not in external references. I'm not sure what else might be different.

Here are some weblogs on the subject, but it sounds like you have the BSP side down.

/people/thomas.jung3/blog/2005/02/14/bsp-and-microsoft-excel--learning-to-live-together

/people/thomas.jung3/blog/2005/02/23/bsp-and-microsoft-excel--learning-to-live-together-part-2

Former Member
0 Kudos

> I am doing your first approach and I am able to

> maintain my macros.

o.k. so it should work

> I didn't create the spreadsheet or the macros (just

> the BSP part)

I did only the BSP part too.

Please let me know how you convert your excel files to xml without loosing the macros.

I just did 'save as' with type 'xml' in a given spreadsheet.

> We are on Office 2003. Our macros are stored within

> the spreadsheet, not in external references.

We have MS Excel 2002. The macros are stored inside the spreadsheet.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I may have spoke too soon. It appears that my function person is just rather talented with formulas and doesn't have any macros in the spreadsheet. The following link makes it sound like the next version of office will support this:

http://www.exceluser.com/biz/Excel%20for%20Business%2005-06-29.htm