Problems with Exporting to Microsoft excel

Hello,

I just found out that “Send to MS excel” function fails whenever the form to be exported contains a field value with slash in it.

I was trying to export posted invoices and one of the post invoices has slash in its external document field.

The version of my system is NAV 6.0SP1 (6.00.29626).

Does anyone know whether this is a known issue?

Do I need to prevent the users from typing in slash? or is there a fix for this?

Thank you.

hi snam,

i use the same version and i can export forms to MS excel with slash in it. what problem are you facing?

Hello, Shona.

Thanks for reply.

When I try to export list of posted invoces (Sales & Marketing → History → Posted Invoices ) by pressing “Send To Microsoft Office Excel” icon in the tool bar, I get an error pop up displaying below message:

“Problems during load”.

The log file is as below:

XML ERROR in Table
REASON: Bad Value
FILE: C:\Users\younn\AppData\Local\Temp\39\Posted Sales Invoices - 1.xml
GROUP: Cell
TAG: Data
VALUE: 200606/200607

I did some testing and found out one of the posted invoices has its external document No. field as 200606/200607.

Without this particular invoice, exporting to excel wokrs fine.

Any ideas?

Thanks for your help!

check whether the doc no is set as primary key. if it is set as primary key then it cant have two values like that.

“external document No. field as 200606/200607.”

External document no field is part of sales invoice header table and it is not set as its primary key.

Is there a primary key for a list also? If so, how can I check that?

When I select “Sales & Marketing → History → Posted Invoices” and press F5 to view the posted invoices in list,

I see the external document no field in the second column of the list.

Actually I just find out the slash value gets exported successfully in other fields.

Thanks.

there is no primary key for list. only for tables we have primary keys. to check the primary key select “Sales & Marketing → History → Posted Invoices” and press ctrl+F2 , this will take you to the dsign of this post. press shift + f4 to view the properities, in the source table check the table name, now go to that table and check for the primary key by going to design and press alt+v+k

i did the same way you described. i could export it dear. check whether there is any problem with your system. because we could export with slash in the export invoice.

That’s odd. I guess I better do more looking around.

Thanks for all your help.

I will update you when figure out the cause.

Take care~

Shona,

I checked out the primary keys of sales invoice header table containing “external document no”, and

the table actually has external document no as one of its primary keys.

So your first suggestion was right on track.

===========================================================================

check whether the doc no is set as primary key. if it is set as primary key then it cant have two values like that.

“external document No. field as 200606/200607.”

===========================================================================

So the user is not supposed to input two values with slash in the first place if the field is primary key?

Or is this just for the exporting?

Thanks.

How can external Doc Number be the primary key? Primary key is “No.” (Document no).

Hello, David.

Thanks for reply.

Does alt+k+v show primary keys of a table?

I did alt+k+v at the sales invoice header table designer, and it showed be below table:

Enabled Key SumIndexFields
Yes No.
Yes Order No.
Yes Pre-Assigned No.
Yes Sell-to Customer No.,External Document No.
Yes Sell-to Customer No.,Order Date
Yes Sell-to Customer No.,No.
Yes Prepayment Order No.,Prepayment Invoice

Since External Document No. was included here, I assumed it was one of the primary keys.

Any ideas why I am getting the bad vaule error when exporting the posted invoice that has its the external document no with slash?

Thanks.

hey snam:)

we can have slash values in primary key too! i just check it out! but still i can export it! i really dont no why you cant!

and yes alt+v+k takes to the keys in that table:) otherwise you can go to—>files---->select keys in that! it will also produce the same result only!

david,

the External Document No. is set as primary key in that field!

FYI.

There is only one Primary Key per table in Navision and the values for that are unique.
You can see the primary or first key for a table via the object designer and using the alt+v,k or you can use View, Keys from the Tools, drop-down menu.

In Table 112, Sales Invoice Header; External Document No. is part of one of the secondary keys for that table (it is appended to the Sell-to-Customer No.) Secondary keys may be non-unique.

As for the original question; check your lecal settings (Control Panel) and the default style sheets that are used for exporting data from Navision into Excel.

[:)]

Shona I don’t think you have a clue what you are talking about, and you are only confusing the issue by adding wrong information. Primary key AS I SAID ABOVE is “No.” if you don’t know something and are just guessing, then please make that clear otherwise its very dangerous to state things as though they are facts.

No; that shows a list of ALL keys. The first is primary the rest are secondary.

I do reember an error something like this, in the very first ver of 5.00 but I thought it was only if the name or caption of the form had a “/” in it, or maybe the tab on the form. I am pretty sure that was fixed in the very first of the hot fixes. Have you tried removing the / from a specific order and proven that its is 100% certain the reason for the crash

mmm it is set as secondary key! i thought it was clear from what jonathan said!..and for your kind information i do know what 'm speaking about! i didnt see the table clearly before! but when i did, i just saw john’s post so thought snam will be knowing i made a mistake!

And david, i know you are experienced in this field and i respect that, but that doesnt give you the right to criticize others for their lack of knowledge! if you know and are willing to help then that fine! thank you! but dont be rude to others!

you have already made funny of me in my previous post! and the first time i posted you were really rude to me saying that i shouldnt use short forms! but i just mended my ways and 'm using full forms now! so you can try being gentle once a while!

You are still using some of your SMS text which is still very annoying.

BUT I was not commenting that you don’t know something, we all have to learn, I was commenting that you stated repeatedly information that is not correct.

only once i did mistake when i stated external no is primary key. didnt do it again and again! and i dont want to agrue now!