Access to Excel Data Transfer When Language Isn't English

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Access to Excel Data Transfer When Language Isn't English

Post by grovelli »

Zipped file goes over the accepted size so I uploaded it here
On the startup form, select gennaio for start, ottobre for end, 2011 for year and then click the button labelled UtiImp.xls. The UtiImp.xls file gets created just fine if the language settings in Windows are English UK while if I select Italian, the numbers in the range c5..e20 in the Dati tab in the Excel file are mostly wrong. How can I solve this?
Last edited by grovelli on 04 Nov 2011, 16:11, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by HansV »

Your link appears to be to the Virgilio home page...
Sorry, it works now.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by HansV »

What are the correct values? And how can I check the values? Surely you don't expect us to dig through 144570 records to find out?
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by grovelli »

Sorry Hans,
Eng.jpg is what I get if language is English and Ita.jpg when language is Italian
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by HansV »

If you open the query qryExport on a system with Italian settings, does it return the correct values, or do they already look as in Ita.jpg?
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by grovelli »

Hi Hans :-), it returns the correct values

User avatar
HansV
Administrator
Posts: 78402
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by HansV »

What happens if you remove all instances of

& ""

from the following lines in ExcelExportDati:

Code: Select all

i = 5
    Do Until rst.EOF
        ws.Cells(i, 2) = rst!Impianto & ""
        'ws.Cells(i + 18, 2) = rst!Impianto & ""
        ws.Cells(i, 3) = rst!marc & ""
        ws.Cells(i, 4) = rst!Int & ""
        ws.Cells(i, 5) = rst!Disp & ""
        i = i + 1
        'fFound = False
        'For i = 5 To 20
        'If ws.Cells(i, 2) = rst!Impianto Then
        '    ws.Cells(i, 3) = rst!Totale & ""
        '    fFound = True
        '    Exit For
        'End If
        'Next i
        'If Not fFound Then MsgBox "Label " & rst!Impianto & " was not found!"

        rst.MoveNext
    Loop
Best wishes,
Hans

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by grovelli »

It works! :clapping:
I forgot why I put the "" after the ampersand though :scratch:

Pat
5StarLounger
Posts: 1148
Joined: 08 Feb 2010, 21:27

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by Pat »

grovelli wrote:It works! :clapping:
I forgot why I put the "" after the ampersand though :scratch:
Maybe to make them text fields rather than numeric??

grovelli
4StarLounger
Posts: 528
Joined: 26 Jan 2010, 15:14

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by grovelli »

Hi Pat :hello:, I'm not sure about that since, with English settings, keeping the quotes still produces numbers when numbers are passed to the Excel cells as do most of the numbers passed with Italian settings.

Pat
5StarLounger
Posts: 1148
Joined: 08 Feb 2010, 21:27

Re: Access to Excel Data Transfer When Language Isn't Englis

Post by Pat »

Fair enough, i know i have used them in the past, obviously under different circumstances.