I have a question on the export to excel. I created a dataport and export the customer's address and then import to excel. But today I found the data exported are mismatched when I imported it into Excel. I also tried to copy the data directly from the subform of Navision and pasted them to excel, it is the same thing, most to the data(address1, address2, state and etc) fill one column in Excel. Does anyone of you happen to know what caused this? Thanks a lot!!! Very appreciate it!
0
Comments
If you have a csv file and you right click on it to open with Excel, it will not open properly. You have to run Excel, then go to File --> Open, find your csv file, and follow the dialogs that open.
Hope that helps. Good luck.
My Blog - nav.education
AAA
A3D-511B
180 Concord Pike
There should be three columns in the above data, but they are displayed in one column after I export it from dataport or copy directly from subform. I also checked some other data that works and I cannot tell any difference between them. I also created a dataport for the sales order and it is the same thing. Some sales orders are well exported, while the others are not.
Please look at the following data that are exported:
"CO05","Dz
","5 Grand Road
","","Newburyport
","","01220
","NJ
",""
So, I have to manually adjust them into one line in txt file before I import them to Excel. If we have a lot of data like that, we have to spend a long time.
The correct one export should be:
"CO05", Dz","3100 urlineAvenue","","Chatsworth","","01311","NJ",""
If we have to pay attention to the special character every time, it looks like it is not friendly. There should be a way to solve it, is it right? Please help!
Try to use in your dataport separators less likely to be used by the users. Example: ~ ^. Most of the time it works.
If you just want to export to excel you could write a report that does this right to excel no conversions needed.
There's a great example in the download section My Mark Brummel
http://www.mibuso.com/forum/viewtopic.php?t=12014
http://www.BiloBeauty.com
http://www.autismspeaks.org
No Name Address Address 2 City State Zip Phone Fax Contact
You can use this as an example, add or remove fields that you need.
http://savatage99.googlepages.com/50095 ... oExcel.fob
the automation in use is Microsoft Excel 11.0 Object Library'.Worksheet you'll find it in the Globals. you can change it to whatever verson of excel you are using incase it doen't run for you.
http://www.BiloBeauty.com
http://www.autismspeaks.org
This method can be applied to other reports too.
You pretty much copy the code from the OnPreDataItem, OnPostDataItem & EnterCell to your new report. The OnAfterGetRecord Trigger you put the fields you want to export. Change the Text Constants to say what you want.
Basically
http://www.BiloBeauty.com
http://www.autismspeaks.org
I made so far a lot of dataports to export to Excel, but this method is far more convenient to use. I did not notice Mark Brummel's example, so I only checked it today.
I am going to see how is it working for more complicate reports, with GroupFooter and Footer sections.
I think that I am going to use this method whenever a dataport cannot be used for some reasons, but otherwise I will stick with the dataports.
What you do is put the code on the SECTION you want to export.
Here's an Example using the Customer Aging Report.
http://savatage99.googlepages.com/50085 ... oExcel.fob
In response to your post above - yes it's not a super fast procedure, but it is just 1 step. You give up speed for ease. 8)
Usually I set filters (ie By Salesperson) because the subsequent times you run the report the faster it gets.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Anyhow, it could be very useful, especially for some very specific exports, where you have several indented DataItems, you need to use GroupFooters, or you need an Options tab which is tricky to add in the dataport.
Thank you once again.