Link to home
Start Free TrialLog in
Avatar of mraghuv
mraghuv

asked on

save from excel 97 to html

Any tips on how to save excel 97 file to html file?

Thank you,
Raghu
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

I did some of in a "manual" way. Take a look at:
www.angelfire.com/realm/vb-shared/index.html
Avatar of trkcorp
trkcorp

Add a reference in your project to "Microsoft Excel 9.0 Object Library" and try this:

Dim xlApp As Excel.Application
Dim xwb As Excel.Workbook

Set xlApp = New Excel.Application
Set xwb = xlApp.Workbooks.Open("c:\YOUR_SPREADSHEET.xls")
xwb.SaveAs "c:\YOUR_SPREADSHEET.htm", xlHtml
xwb.Close
Set xwb = Nothing
Set xlApp = Nothing
Add a reference in your project to "Microsoft Excel 9.0 Object Library" and try this:

Dim xlApp As Excel.Application
Dim xwb As Excel.Workbook

Set xlApp = New Excel.Application
Set xwb = xlApp.Workbooks.Open("c:\YOUR_SPREADSHEET.xls")
xwb.SaveAs "c:\YOUR_SPREADSHEET.htm", xlHtml
xwb.Close
Set xwb = Nothing
Set xlApp = Nothing
Nice code!
But it assumes two things:
All people has Office2000
You save entire workbook, if you need just a range: is it possible with that?
Cheers
Avatar of mraghuv

ASKER

I have excel 97. So i can use Microsoft Excel 8.0 Object Library.

I have tried using
xwb.SaveAs "c:\YOUR_SPREADSHEET.htm", xlHtml
on a m/c with excel 2000. It works fine.

it doesn't work with excel 97.

raghu

ASKER CERTIFIED SOLUTION
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi mraghuv,

you could also check out
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q168561

HTH:O)Bruintje
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
https://www.experts-exchange.com/questions/Q.20035152.html
https://www.experts-exchange.com/questions/Q.20145192.html
https://www.experts-exchange.com/questions/Q.20272018.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
I didn't try it but bruintje's link looks promising...
well i didn't test it but it looks like it's going to work, got only 2k and xp here so maybe i can put some final test in tomorrow if my chief doesn't look over my shoulder to see why the hell i want to save a spreadsheet to html when we're using ASP to pull SQL Server data to html ;)
:)))
I know the feeling...
mraghuv -->  Can you PLEASE UPDATE us here?
Thanks,
Moondancer - EE Moderator
download site from bruintje's comment (just in case that you didn't have it) http://download.microsoft.com/download/excel97win/HTML/97/WIN98/EN-US/HTML.exe

********************************************************
IF THIS IS USEFULL DO NOT ACCEPT THIS COMMENT AS ANSWER.
********************************************************
gee, i cannot use it. :(
hehe.....then this one stays open to sunday, that's when i got my next chance on xl97 or else just refund the points and make this a PAQ

there's something usefull in it :)

and i got 500+ unread messages in my EE box
No. To ME. I have Excel in spanish and download is available in english only. Anyway, it returns me an error when try to execute (dll missing xlHtml.dll)
How about a point split between the two of you?
Moondancer - EE Moderator
Moondancer that's fine with me, Richie provided some usefull stuff to this one also

and he did his best to test both solutions provided ;)

bummer "you got to have xl97 installed to run this program" so it can only work on xl97

and that is the question, so i suppose a split is OK

:O)Bruintje
Private Sub Form_Load()
Dim arr() As String
Dim E0  As String, E1 As String
arr = Split("150-150", "-", , vbTextCompare)
E0 = "Bruintje: " & arr(0)
E1 = "Richie: " & arr(1)
MsgBox E0 & ", " & E1 & "... All Happy!" & vbCrLf & "Thanks again, Moondancer!!!!!", vbInformation
End Sub
Thanks for your help here and for hanging in there.  Points have been split.
Points for Bruintje -> https://www.experts-exchange.com/jsp/qShow.jsp?qid=20291590
Moondancer - EE Moderator
Thanks to you again...