I need to read many different exel files into a dbf.
I change the headers to match the dbf fields and 'normaly' i change num to tekst fields in exel, but many times I get the folowing hard error.
I'ts not easy to determine witch kolom in exel is still not correctly changed.
Any tips how to know or change that it will work in most cases ?
Maybe a extra xbrowse setup that will show the kolomnames and type ?
Code: Select all
cCurFile := cGetFile( "Exel file| *.xl*| ", "Please select a file" )
if msgYesNo("Create database")
Create_Dbf(cDir)
else
use prijzen EXCLUSIVE NEW
endif
//oRange := GetExcelRange("C:\data\prijslijsten\Guide.xlsx" ,"Blad1" , "A1:E50" )
oRange := GetExcelRange( cCurfile , , )
xbrowse(oRange)
select Prijzen
// FW_ExcelToDBF( oRange, "NAAM,CODE,EAN,BRUTO,PICTURE" , .t. )
If MsgYesNo("Deze gegevens toevoegen")
FW_ExcelToDBF( oRange, NIL , .t. )
endif
Application
===========
Path and name: C:\Maveco_32_bit\TEST.EXE (32 bits)
Size: 5,638,656 bytes
Compiler version: Harbour 3.2.0dev (r1506171039)
FiveWin version: FWH 19.12
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 37 secs
Error occurred at: 04/01/2020, 22:55:35
Error description: Error BASE/1102 Argument error: UPPER
Args:
[ 1] = U
Stack Calls
===========
Called from: => UPPER( 0 )
Called from: .\source\function\DBFFUNC2.PRG => (b)FW_ARRAYTODBF( 408 )
Called from: => ASCAN( 0 )
Called from: .\source\function\DBFFUNC2.PRG => FW_ARRAYTODBF( 408 )
Called from: .\source\function\DBFFUNC2.PRG => FW_EXCELTODBF( 271 )
Called from: .\maveco.PRG => READXLS( 12749 )
Called from: .\maveco.PRG => (b)BUILDMENU( 487 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1556 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1141 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
Called from: .\maveco.PRG => MAIN( 204 )
System
======
CPU type: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz 2808 Mhz
Hardware memory: 8071 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 5
1 ,
2 , C:\WINDOWS\System32\shcore.dll
3 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
4 G, C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17763.914_none_7e4b706e762fa5c
5 HardwareMonitorWindow, C:\Maveco_32_bit\TEST.EXE
Variables in use
================
Procedure Type Value
==========================
UPPER
Param 1: O Class: ERROR
(b)FW_ARRAYTODBF
Param 1: U
Local 1: U
Local 2: U
ASCAN
Param 1: U
Param 2: N 9
FW_ARRAYTODBF
Param 1: A Len: 10
Param 2: B {|| ... }
FW_EXCELTODBF
Param 1: A Len: 452
Param 2: A Len: 10
Param 3: U
Local 1: U
Local 2: U
Local 3: U
Local 4: A Len: 10
Local 5: U
Local 6: U
Local 7: U
Local 8: U
Local 9: U
Local 10: U
Local 11: U
Local 12: U
Local 13: U
Local 14: U
Local 15: U
Local 16: U
Local 17: U
Local 18: N 0
READXLS
Param 1: O Class: TOLEAUTO
Param 2: U
Param 3: L .T.
Local 1: U
Local 2: L .F.
Local 3: A Len: 10
Local 4: A Len: 452
Local 5: A Len: 0
Local 6: A Len: 0
Local 7: N 10
Local 8: N 452
Local 9: U
Local 10: L .F.
(b)BUILDMENU
Param 1: O Class: TWINDOW
Local 1: C "c:\data\prijslijsten\"
Local 2: S
TMENU:COMMAND
Param 1: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20169
Local 1: O Class: TMENUITEM
TWINDOW:HANDLEEVENT
Param 1: N 20169
Param 2: N 0
Local 1: N 0
Local 2: N 20169
Local 3: N 0
Local 4: U
_FWH
Param 1: N 273
Param 2: N 20169
Param 3: N 0
WINRUN
Param 1: N 0
Param 2: N 273
Param 3: N 20169
Param 4: N 0
Param 5: N 1
Local 1: O Class: TWINDOW
TWINDOW:ACTIVATE
Param 1: N 853476
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: U
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
DataBases in use
================
1: LEVLIJST RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
3 3 .F. .F.
Indexes in use TagName
=> upper(Levercode) CODE
Relations in use
2: ART_MASTER RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.
Indexes in use TagName
Relations in use
3: => PRIJZEN RddName: DBFCDX
==============================
RecNo RecCount BOF EOF
1 21728 .F. .F.
Indexes in use TagName
=> upper(fab_ref) FABREF
upper(code) CODE
upper(benaming) BENAMING
Relations in use
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TWINDOW
5 TCONTROL
6 TGET
7 TFONT
8 TBRUSH
9 TMENU
10 TREG32
11 TMENUITEM
12 TBAR
13 TRECT
14 TBTNBMP
15 TMSGBAR
16 TDIALOG
17 TXBROWSE
18 TXBRWCOLUMN
19 TSCROLLBAR
20 TCLIPBOARD
21 WIN_OLEAUTO
22 TOLEAUTO
23 TSTRUCT
Memory Analysis
===============
712 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes