I am using automation to download a .dat file and parse it using excel parser module in perl.
But whenever i tried to access the .dat file it says not a valid excel file. (all these operation has been done in linux)
As a work around I have moved the .dat file to windows machine and opened it using excel file.
Then saved the .dat file as an excel file in windows. Then resend that file to Linux machine. Now the perl script can parse the file.
Instead of this long path can I convert the .dat file to excel file in linux itself?
If yes then how?
First Few Lines from my .dat file :
F_NF_CD ART_GRP_NO ART_GRP_DESCR ART_GRP_SUB_NO ART_GRP_SUB_DESCR ART_NO ART_DESC SELL_UNIT PACK_TYPE SELL_PR VAT_PERC MRP_PRICE STOCK ART_STATUS EXTRA_INFO BLOCK_IND
F 191 HYGIENE PAPERS 3 LADIE’S HYGIENE 287432 SOFY SIDE WALLS LARGE SOFT15P 1 EA 89.8 5 99 47 1 SELL
F 191 HYGIENE PAPERS 3 LADIE’S HYGIENE 287422 SOFY SIDE WALLS REGULAR SOFT15P 1 EA 80.73 5 89 0 1 SELL
Actually the script tries to read the meta data of a file before parsing it. If the module see the metadata is not excel it won’t proceed further. So it is important to change the metadata of the .dat file to .xls. Which i dont think possible without proper conversion tool.