To write a program to convert .CSV file into Excel Worksheet and vice versa.
(1) From .CSV to Excel
After the conversion, some of the fields can be hidden, protected and with some calculation inside the cells ( eg. qty * price = subtotal, summary of subtotal to total )
In the sample excel file which is after conversion.
Column A,B,C will be hidden and protected
Column D,E,F, K,L,M,N will be protected
There is some calculation on particular columns and cells
(eg. I5=G5*H5, Page Total on column L, Section Total on column M etc)
Page Total will be calculated if “Page Total” found on column “E”
Section Total will be calculated if “Section Total” found on column “E”
Bill Total will be calculated if “Bill Total” found on column “E”
Job Total will be calculated if “Job Total” found on column “E”
• The first row of the file indicate the length of characters for each column.
If the column = 0 means the column need to be hidden and protected
• The formula of column I is automatically setup during the converstion.
• The formula of Page Total, Section Total, Bill Total and Job Total are all automatically setup during the conversion.
• The First row,which used for the definition of column width, will no longer display in the output excel file.
(2) From Excel to CSV
After enter information into the Excel worksheet, those information can be converted back into .CSV as the original format.
(3) Execute as command line
• The program must be able to run as a command line program
• there is an option in the command line, which is the conversion mode,
if the conversion mode is type 1, the csv file will convert to excel as the sample file [login to view URL] file with all the specific requirements as (1), such as hidden, protect and calculation.
If conversion mode is type 2, the csv file will convert to .XLS files column by column without any special formatting but the width in terms of # of characters specified in the first row of the .CSV file.