[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Saving Excel Spreadsheet

Posted on 2003-10-28
6
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Accepted Solution

by:
NetPointer earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

649 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