Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crazy Office97sr2 Issue

Status
Not open for further replies.

SgtPepps

IS-IT--Management
May 1, 2002
109
GB
Hello, I have a procedure that copies a file to the same path as the original but with a diffrent .ext

FileCopy "C:\dir\file.dbf", "C:\dir\file.xls"

If I was to use Office97sr1 i have no problems using the .xls, however, with Office97sr2 a couple of hundred rows are missing from the .xls. I know that i've not reached the limits of excel as there is only 9000 records in the original .dbf and i believe excel can have around 85000 rows.

M$ website was useless when i tried to find out what bug fixes there were in sr2. I'm not going to have the oppertunity to upgrade all of our users to Office 2k/XP for some time and I'd rather not install Office97sr1 so I need to figure this out.

Does anyone have any ideas??

Thanks

Mike

Hold the Wheel and drive
 

1. There is a total of 65,536 rows to a worksheet.

2. Using FileCopy is generally not a problem because it just mimics the ordinary Copy function as in Explorer - making another copy of the file on disk. Nothing to do with Excel.

I think your problem is that both .dbf and .xls file types are "known" to Excel - which as a result expects to load a specific format. In essence you are supplying it with a "corrupted" .xls file (because it is still in .dbf format).

To get this to work correctly you need to open the .dbf file into Excel and do File SaveAs... Microsoft Excel Workbook. If you want the VBA code, macro-record the process.




Regards
BrianB
** Let us know if you get something that works !
================================
 
Yes, that will work well but the procedure that copies the file is writan in Word97VBA, so i'm back to the original problem that is Word97VBA can't use GetObject for a .dbf file.

I've solved my problem now anyway, I have a another procedure that is always run before this one. It is an ExcelVBA procedure so i can do everything i need to in there.

Thanks for your suggestion BrianB

Mike

Hold the Wheel and drive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top