Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Save Pivot Table in Excel with vbs

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59771
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Save Pivot Table in Excel with vbs
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Save Pivot Table in Excel with vbs - 5/3/2008 8:30:49 AM   
  elena1707

 

Posts: 3
Score: 0
Joined: 5/3/2008
Status: offline
Hello everyone!

I have done some researche online, but did not find any good info so far...Here's what i'm trying to do...
I have an excel file that is automatically updated with vbs every day. The file has two pivot chart. Now, i'm trying to display those charts on my web site. I can manually save them as .htm and keep the ineraction feature and then attach them to my page. But since the charts change every day i would like to find a way to save them as htm with vbs automatically every day, so the graphs online are always up to date...

Please let me know if that makes any sense and if that's possible.

Btw, i'm not too bad with scripting but i'm pretty retarded when it comes to web stuff. Please be patient ;-)

Thank you in advance

 
 
Post #: 1
 
 RE: Save Pivot Table in Excel with vbs - 5/4/2008 10:17:08 AM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you're updating the XLS file using a VBS file then more than likely you're using the Excel object to do so....if so, use its SaveAs method to save the XLS file as an HTML file by specifying the file format.

This might be helpful....
Const xlHtml = 44

UPDATE:  Haha...look what I found in a post just a few down from yours:  http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar06/hey0307.mspx

< Message edited by dm_4ever -- 5/4/2008 10:21:17 AM >


_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to elena1707)
 
 
Post #: 2
 
 RE: Save Pivot Table in Excel with vbs - 5/4/2008 1:35:03 PM   
  elena1707

 

Posts: 3
Score: 0
Joined: 5/3/2008
Status: offline
Thanks a lot, i'll try it tomorrow...i guess my concern with it is how to save the pivot table and keep it interactivity. I think if i just save it as htm it will give me palin page...Thank you anyways


(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Save Pivot Table in Excel with vbs - 5/6/2008 3:30:46 AM   
  elena1707

 

Posts: 3
Score: 0
Joined: 5/3/2008
Status: offline
Yep, so far nothing...i can save it as .htm, but there is no interactivity...so it really defeates the purpose of the pivot table all together.

(in reply to elena1707)
 
 
Post #: 4
 
 RE: Save Pivot Table in Excel with vbs - 5/6/2008 3:42:45 AM   
  dm_4ever


Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Record a macro of you manually going through the steps of saving the pivot table and then look at the code generated....with a little work you should be able to rewrite it in VBS.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to elena1707)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Save Pivot Table in Excel with vbs Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts