Skip to main content
gamedev.net
🔒 Locked

Excel property

Started by Tiger99 2 replies 1.2k views
Original Post
Tiger99
Tiger99
Hi I am trying to use ASP to display database data in excel spreasheet. I was able to display it on an active sheet (ie. Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet") objSpreadsheet.Cells(row, 1).Value = idT) Now, my question is I am not quite sure how to add a new spreadsheet and rename it. I have tried she = objSpreadsheet.Worksheets.Add(1) she.Name = "hi" Unfortunately, it doesn't do the trick Has anyone done anything like this? Thanks for any input
Drazgal
Drazgal
Ive only accessed excel through C++, to rename a worksheet I used a function like put_Name(char*). I tried properties but never seemed to work for the name. Try searching for a function to do it instead.
cyn
cyn
I haven't worked with ASP, but anytime I need to do something in Excel, I record a macro, then tweak the code. Most of Microsoft's automation seems to work in other automation-enabled applications/languages from what I have seen.

The other thing you could try would be opening an existing Excel book and trying to call a macro from within that knows how to add and rename the sheet.

cyn
Tiger99
Tiger99
Using Excel macro was the first thing I tried, unfortunately, the property doesn't apply to ASP
Any other idea?

Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.