The DLL can convert XLS/XLSX files to CSV format
There are only two functions:
int
XLStoCSV_Converter(HWND hwnd, int argc, char *argv[]);
It accepts three parameters.
The first "hwnd" must be NULL. It is not used.
The second "argc" must be equal to number of parameters.
The third "argv" contains parameters.
int
XLStoCSV_ConverterStr(HWND hwnd, char *params);
It accepts two parameters.
The first "hwnd" must be NULL. It is not used.
The second "params" contains parameters which are delimited by #.
The functions return:
0 - success
1 - not recognized a source file
2 - not recognized a target folder or a target file
3 - cannot open a source file
| Drive:\Path\FileName.xls | Source XLS file |
| Drive:\Path\FileName.csv | Target CSV file |
| Drive:\Path\ | Target CSV folder |
| /RECORDS=0 | Do not export records of the table. |
| /OVERWRITE=1 | Overwrite existing file. |
| /OVERWRITE=0 | Do not overwrite existing file. (default) |
| /REMCRLF=1 | Remove CR+LF in Memo fields. |
| /REMCRLF=0 | Do not remove CR+LF in Memo fields. |
| /ESCAPE=????? | Escape character before a single or a double quote. Examples: /ESCAPE=# "/ESCAPE="" |
| /QUOTES=1 | Conclude character and memo fields in double quotes. |
| /QUOTES=0 | Do not conclude character and memo fields in double quotes. |
| /FIELDS=? | Delimiter between fields. Example: /FIELDS=;
Special values: |
| /RECORDS=? | Delimiter between records. Example: /FIELDS=CRLF
Special values: |
| /HEADER=1 | Include fields names. |
| /HEADER=0 | Do not include field names. |
////////////////////// sample1.cpp //////////////////////////// //parameters in the command line // //sample1.exe source.xls target.csv // #include |
|
////////////////////// sample2.cpp //////////////////////////// //parameters in the source code // //sample2.exe // #include |