Solved

Saving Excel Spreadsheet

Posted on 2003-10-28
6
276 Views
Last Modified: 2008-02-01
I need help, this is kind of a continuation of another question, that I has not fully been resolved.  I have created an application that creates a report.  It works perfect on the development machine, but will not save the spreadsheet on a differerent machine.  The difference is the development machine has excel 2002 and the other machine has excel 2000. I am using

xlApp.Application.Workbooks(1).SaveAs("C:/test.xls") and this is where the problem is.

Is there anyway of getting this to work, I need help.  

here is the link to more info on the topic, I am dealing with.

Thanks

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20780057.html#9633334
0
Comment
Question by:dkilby
6 Comments
 
LVL 4

Accepted Solution

by:
NetPointer earned 500 total points
ID: 9637015
Give a try to this....

Dim oStr as Object
dim strFile as String = "C:/test.xls"

oStr = strFile
xlApp.Application.Workbooks(1).SaveAs(oStr)
  OR
xlApp.Application.Workbooks(0).SaveAs(oStr)

Regards,
NetPointer
0
 

Author Comment

by:dkilby
ID: 9637099
ixlApp.Application.Workbooks(1).SaveAs(oStr) is the way I had it to start with but I changed to by putting the fileName in.  What is the difference between having the 0 or the 1 after workbooks?
0
 
LVL 4

Expert Comment

by:NetPointer
ID: 9637846
just in case u dont have the work book with index 1 and only 0...

Regards,
NetPointer
0
 
LVL 2

Expert Comment

by:wellilein
ID: 9641584
If you want saving in a previous format, try
ActiveWorkbook.SaveAs Filename:= "c:\test.xls", FileFormat:=xlExcel9795

xlApp.Application.Workbooks(0).SaveAs Filename:= "c:\test.xls", FileFormat:=xlExcel9795
might work also.
By the way I only found the constant xlExcel9795, not something like xlExcel2000.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10232179
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: NetPointer {http:#9637015}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now