in reply to Reading data from excel and create xml file using data
Update:
well it would help if i new something about data your structure. Personally i rarly use xml and xls, only when there is no other options (i like my data in csv, tsv...) but looking at your scripts all you should do is initialize writer then xls and in the part where it states
just state that output of your xls should be input to xml. and that should be it . in the end you close your xmlmy $source_cell = $source_sheet->{Cells}[$row_index][$col_index]; if ($source_cell) { # here you add data from xls into xml (not just copy/past the line + like i did but you have to know the structure of your data thah you +wish to pass into xml) #$writer->startTag("PosMntReq", "ReqID" => "18AEXR" ,"TxnTyp" => " +1","BizDt"=>"2003-12-04","SetSesID" => "EOD", "TxnTm" => "2003-09-10T +00:00:00"); #$storage_book->{$source_sheet->{Name}}->{$row_index}->{$col_index +} = $source_cell->Value; } # end of source_cell check
$writer->endTag("PosMntReq"); $writer->endTag("FIXML"); $writer->end(); $output->close();
|
|---|