Dear All,
I have one scnario that the client will create Sales Order header details and for lines they want to import from a excel sheet. They have a seperate excel sheet where they enter Line details, in the Sales Order form they want to call that excel file and import in to the Lines.
Any idea how to overcome this?? Any codings??
0
Comments
The Dataport cannot import from Excel xls without saving to csv first
So look at the Import from Excel report on the system Report 81, this reads a sheet and create a Budget.
It should give you a guide to get started.
The columns in the Excel should refect how you would enter data by hand
Read the sheet into the Excel Buffer then use the excel buffer Row and Column Number to Add the Lines, Here is a sample to get you started!
Headings in Row 1 data starts in Row 2
Columns = 1: Type, 2: "No." 3: Quantity
Function Readsheet has been run
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
The Dataport cannot import from Excel xls without saving to csv first
Hi David,
I did not mention that he would have to save the worksheet as a csv first before importing :-# ... but its the alternative I was trying to suggest....we already have a scenario like this with a client.. The Import from Excel function you suggested is of course the other way...
Just did not want to give the idea that a Dataport will upload a xls.
Saving as csv is fine in most cases, but I prefer Excel, you cannot always import a csv file from UK to USA for example, as the date is a different format, and some countries format the decimal as 1.000,00 as in the UK 1,000.00, these scenario's Excel deals with, and if you are getting data from an external company, and you open and save as csv, if anything goes wrong who gets the blame.
Likewise if you are getting a csv file, use a dataport, do not open in Excel, use notepad to view, as Excel has been know to change the format, leading zero's etc: :shock:
I recently created a codeunit to update exchange rates, by getting a EUR to currency rate, csv file from the web, all was fine I dealt with the date for the USA, but forgot about the decimals, it was tested on all databases, but when a user had a regional setting that changed the Decimal from 1.2345 to 1,2345, we got some strange FX rates :?
Had this been Excel no problem!
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com