Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: DBF to CSV in batch: how to do?

16 Aug 2014   #11

Windows 7 Ultimate x64

The script closes Excel gracefully already, the line objExcel.Quit is precisely for that. Do you see a leaking Excel instance in task manager? If so, it may means that an error ocurred and the script did not finish succesfully.

No idea about the warning (I never tested over a network), but if a ridiculous Windows restriction comes by, the .bat file that launches it might simply copy from the network to the temp directory, run it from there, then delete it afterwards.

My System SpecsSystem Spec
21 Aug 2014   #12

Windows 7

Alejandro85, good afternoon... thanks for your support but there is a big problem: Excel trunk the DBF format, it misses the last 20 columns after the conversion. If I open the file also with Excel 2013 I see that problem.

As I seen Libreoffice is able to manage with no issue the DBF format but... did you can help me to convert that script in a one what works for LibreOffice?
My System SpecsSystem Spec
24 Aug 2014   #13

Windows 7 Ultimate x64

I would not expect Excel truncating the file. The DBF format supports up to 255 columns, while Excel uses 256 in .xls format and .xlsx up to 16384, maybe a row lenght limit? I've never tried such usage, an my trivial tests used just small files. Try this, if you open the file in Excel and save it in .xlsx (NOT standard .xls) does it saves correctly? Maybe an intermediate conversion would be all that's needed. If not, Excel is out of question most likely.

Libreoffice is a completely different beast. Their documentation mentions that it supports the very same OLE automation that Excel does. I've never used it, nor even have it to test. It's most likely possible to command Libreoffice from VbScript or similar language, but no idea how to do it exactly. The only official sample I could find (unrelated to your needs) is here:

Otherwise we can try with some other environment, maybe some other language without relying on Excel or something like that.
My System SpecsSystem Spec

24 Aug 2014   #14

Windows 7

Dear Alejandro,
thanks as first for your support. If you try to open the file with Excel and then with Calc, you see the Calc version has more columns. It looks like it is trunked and it loses several columns (20). Can you do something to trick that limitation if so?

My System SpecsSystem Spec

 DBF to CSV in batch: how to do?

Thread Tools

Similar help and support threads
Thread Forum
batch script help
dear all any help to make batch script this the reason i want to make a batch file is to help me update the online games in 60 computers by overwriting or copying big files in one click from 1 source computer... instead of turning on all 60 computers and updating all online games, he'll just...
General Discussion
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Need some help on cmd batch file.
Hi, I would like to a batchfile that will work on both windows 7 and xp to do the following copy /Y d:\document\folder1\file.ini d:\document\folder2\file.ini however in xp it is my document, win7 is document the shell command in win7
General Discussion
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
In need of help doing a FOR /F Do loop in a CMD Batch
I am in need of help doing a FOR /F Do loop in a CMD Batch script. I am trying to write a batch script that will ping all IP addresses in a host file except for an IP address that starts with 127 and skip all commented lines in the hostfile or that start with a #. my current code will ping...
General Discussion
batch files
Can I write simple batch files - example - at 3am xcopy server file to workstation a ?

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:07.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App