I have a text file in csv for import. However, the first line of the text file is the headers for the fields. Is there a way to skip the first line when I run import in the Dataport?
1.) Delete first like from file, or better... make sure that first line isn't exported.
2.) Create a Integer dataitem as the first dataitem. Difine a dummy variable and use this to import all header fields. Make sure you loop this integer dataitem only ones.
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."
you can also import data with a codeunit. You'd only have to write code to parse the lines, and I also think the line length is limited to like 1000 characters or something. Other than that, using a codeunit can enable you to have a file with both header and line information in one file.
You can also use the CG codeunits and import your data out of XML documents.
Comments
1.) Delete first like from file, or better... make sure that first line isn't exported.
2.) Create a Integer dataitem as the first dataitem. Difine a dummy variable and use this to import all header fields. Make sure you loop this integer dataitem only ones.
If it was hard to write, it should be hard to understand."
Thank you! It's working now
You can also use the CG codeunits and import your data out of XML documents.
RIS Plus, LLC