PDA

View Full Version : Converting excel files to folders


04-Aug-2004, 06:09 AM
Hello,

When I compare two files (still excel :) the filenames are
given to bc2, which then runs each file through converter.
The temporary filenames for conversion are something like:

ARGV[0]: c:\temp\t3148t16.tmp
ARGV[1]: c:\Temp\BC2149.tmp
ARGV[0]: D:\p4\depot\Project Management\Inventory\User Accounts.xls
ARGV[1]: c:\Temp\BC214B.tmp

When I go to look around c:\Temp I cannot find the
conversion "target" files anywhere (ARGV[1] filenames).

Question: it looks like conversion result files are removed
from filesystem right after the conversion? Still I see the
conversion result on file compare view so are the contents
copied into memory...

Reason for asking: I need to make a converter which will
turn one file (ARGV[0]) into several files. I believe I
cannot use any random name, because then BC2 wouldn't know
what to compere == it is expecting to find the target file
(ARGV[1]). Thus the plan was to use the target name [ARGV[1]
as a name of temporary folder and somehow try to convince
BC2 to make a folder comparison instead of file comparison...

Problem: How to do folder comparison, when the targets are
removed right away :(

Any ideas? I'm using bc2 as external diff tool for perforce
version control system.

--jouni back from summer vacation and meeting old problems

Erik
04-Aug-2004, 09:22 AM
The converted file is deleted after it is read into the File Viewer.

If you want to convert one Excel Workbook into multiple files, you will have to do so outside of BC2.

To do so, you could use "xls2csv.vbs" in your BC2 directory as a model. You would have to change it to save each page as a separate file. You can run the script using:
wscript xls2csv.vbs %s %t
where "%s" is the source .xls file. I would recommend changing the script to treat "%t" as the target folder. If you need help modifying the script, send an e-mail to support@scootersoftware.com.