Jump to content
  • Advertisement
Sign in to follow this  
Tiger99

Excel property

This topic is 5461 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Using Excel macro was the first thing I tried, unfortunately, the property doesn't apply to ASP
Any other idea?

Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!