XLSX-Datamapper To CSV-Datamapper

Hi Is there a quick and simple way convert a datamapper based on xlsx to a datamapper based on csv??

Unfortunately, no. You’ll have to save your CSV file as an XLS/XLSX file from Excel.

I think you missunderstoot, or I was not clear enough.

I have a datamapper based on xlsx data. with extractions and scripts, but now I need the same datamapper for a csv file. Can I easely use the xlsx datamapper to create a csv datamapper. or do I need to start fresh?

I understood what you meant. There is no native way of converting an existing data mapping configuration from one input data type to another. That’s why I suggested saving your CSV to XSL with Excel so you can use your existing DM config.

Now you could - conceivably, but you did not hear this from me! - unzip the DM config file somewhere (because an OL-datamapper file is a ZIP file) and change a few things in there to manually attempt the conversion. The following may or may not work:

  • Copy your CSV file to the SampleDataFiles subfolder
  • Rename that CSV so it bears the exact same name as the existing XLS file, but with a CSV extension
  • Delete the existing XLS file(s) from that subfolder
  • Open dataminingconfig.xml with a text editor.
  • Change this piece of XML:

<emulationType>XLSX</emulationType>
<flowChartConfig>
<namespaces/>
</flowChartConfig>
<inputDataDefinitionConfig xsi:type="xlsxInputConfig">
<inputDataType>XLSX</inputDataType>
<sheetName>Sheet1</sheetName>
<skipEmptyLines>false</skipEmptyLines>
<skipLeadingLines>0</skipLeadingLines>
<useHeaders>true</useHeaders>
<xlsxEditorDateFormat>LIB</xlsxEditorDateFormat>
</inputDataDefinitionConfig>

to

<emulationType>CSV</emulationType>
<flowChartConfig>
<namespaces/>
</flowChartConfig>
<inputDataDefinitionConfig xsi:type="csvInputConfig">
<inputDataType>CSV</inputDataType>

<skipEmptyLines>false</skipEmptyLines>
<skipLeadingLines>0</skipLeadingLines>
<useHeaders>true</useHeaders>

</inputDataDefinitionConfig>

  • In the <sampleDatafilesList> element, change all file extensions from .xls to .csv.
  • Zip the entire folder into a new file and then change its name from .zip to .OL-datamapper.

I cannot emphasize enough how this is not supported and may produce an unusable file. I simply compared a CSV data mapping config with an XLS one and managed to make it work for me. But if re-creating the datamapping config could potentially take a long time, it’s worth trying the method above… just don’t get your hopes up too high!

ok thank you very much. No insult intended :$.

“That’s why I suggested saving your CSV to XSL with Excel so you can use your existing DM config.”

that’s an excelent solution, and I use that some times, but I have a order wich doesn not alow this, to much steps before the actual DM gets used.

“Now you could - conceivably, but you did not hear this from me!” Thank you very much, I wont tell, and I will experiment with this. Thanks for the option <3