D
Domenico Discepola
Hi all. I have constructed a script that uses Win32::OLE to save an Excel
workbook as a tab-delimited text file (TSV file). This works fine. My next
step is to perform formatting on each field per line in the TSV file while
retaining the # of fields. The problem lies with "empty" cells in the 1st
column of the Excel file.
Example Excel file row:
col A's value=<empty>
col B's value = "1"
col C's value = "2"
<end of row>
When you use Win32::OLE to "tell" Excel to save this as a TSV file (using
the SaveAs method), a hex-dump of the resultant TSV file reveals row1 as:
/^\t12$/ (using regex notation). In other words, I lose the existence of
col A (which I need).
I was thinking of the following solution:
s/^\t/\s\t/, $my_line;
but could there be a 'better' way to handle it?
Any suggestions on how to best solve this problem would be appreciated.
Thanks in advance.
workbook as a tab-delimited text file (TSV file). This works fine. My next
step is to perform formatting on each field per line in the TSV file while
retaining the # of fields. The problem lies with "empty" cells in the 1st
column of the Excel file.
Example Excel file row:
col A's value=<empty>
col B's value = "1"
col C's value = "2"
<end of row>
When you use Win32::OLE to "tell" Excel to save this as a TSV file (using
the SaveAs method), a hex-dump of the resultant TSV file reveals row1 as:
/^\t12$/ (using regex notation). In other words, I lose the existence of
col A (which I need).
I was thinking of the following solution:
s/^\t/\s\t/, $my_line;
but could there be a 'better' way to handle it?
Any suggestions on how to best solve this problem would be appreciated.
Thanks in advance.