I am currently using Excel 2007 version, which is no longer supported to import file with extension .wk1. Can someone able to help in this issue?
Thanks,
Peter
Thanks,
Peter
Alpha Software Mobile Development Tools: Alpha Anywhere | Alpha TransForm |
{*Variables to set before playing this script %LPREF_DATEFORMAT = the name of the script that sets the default windows short date format (Regional and Language Options) %DPREF_A4_DATEFORMAT = the name of the script that sets the A4 application date format %LPREF_DELIMITER = default Windows delimiter (Regional and Language Options) %LPREF_SAV_DIR = path to export folder %DPREF_TEMP_DIR = path to temp folder %DPREF_DB_PATH = path to data (%SYS_DB_DRIVE+":"+%SYS_DB_PATH) %CSV_PROCESS = contains the name of the script that list the field names %CSV_PROCESS = Also equals the name of the temporary table, used as a template, to export from. May have diferent field names than source table. %TABLE = %SYS_CURRENT_DB_SET (Name of the set or table you are exporting from) *} {PLAY %LPREF_DATEFORMAT} {WRITE 23, 1, space(80)} {WRITE 23, 1, "Please wait.. Generating CSV file"} {PLAY "POP_FDFL"} {*Dialog with 2 options, "1" default file name (report.csv), "2" name your file*} {IF %FILE_NAME_OPTION="1", {{SET %EXPORT_PATH, %LPREF_SAV_DIR+"\report.csv"} {SET %file_exist, FILE_EXISTS(%EXPORT_PATH)} {GOTO :G}}, {} } {:F} {FILEDIALOG "SAVE FILE 'DOS FORMAT' - 1 to 8 Characters", %LPREF_SAV_DIR, "*.CSV", "", %EXPORT_PATH} {IF %SYS_LAST_KEY="{ESC}".or.%SYS_LAST_BUTTON=" cancel ", {{GOTO :Z}}, {}} {IF WORD(%EXPORT_PATH,-1)="CSV", {}, {{SET %EXPORT_PATH, %EXPORT_PATH+"CSV"}} } {IF len(word(%EXPORT_PATH,-1)+word(%EXPORT_PATH,-2))>11, {{ALTF10}{CLEAR "%MSG*"} {SET %MSG1, "File name length has exceded the DOS 8.3 limit"} {PLAY "MSGBX_CT"}{GOTO :F}}, {} } {SET %file_exist, FILE_EXISTS(%EXPORT_PATH)} {IF %file_exist=".T.", {{ALTF10}{CLEAR "%MSG*"} {SET %MSG1, "File already exist, Please rename or"} {SET %MSG2, "delete or use another file name"} {PLAY "MSGBX_CT"}{GOTO :F}}, {} } {:G} {PLAY "del_temp"} {*Emptying the temp folder can be achieved in many ways. I prefer using a batch file as oppose to the built-in Alpha4 file management commands. del_temp.scp ---------------------------------------------------------------------------- {SET %temp_del_string, %SYS_SCRIPT_PATH+"\del_temp.bat"+space(1)+%DPREF_TEMP_DIR+"\temp*.*" } {EXEC %temp_del_string, 0, 0} del_temp.bat --------------------------- @echo off del %1 *} uc {%DPREF_TEMP_DIR}\temp1{ENTER} s {PLAY %CSV_PROCESS} {F10} {F2:2}search list{ENTER:2} AA {IF WORD(%TABLE,2)="SET", {U}, {}} {%filter} {F10} Temp file for csv generation{ENTER} n {F10} co {%DPREF_TEMP_DIR}\temp1{ENTER} clco {%DPREF_DB_PATH}\template\{%CSV_PROCESS}{ENTER} dd {%DPREF_TEMP_DIR}\temp2{ENTER} Temp file for csv generation{ENTER} n {F10} co {%DPREF_TEMP_DIR}\temp2{ENTER} uaa {%DPREF_TEMP_DIR}\temp1{ENTER}{F10:2} {PLAY "POST_CSV"} {*Use mainly to perform a global update on fields that may require any special formatting prior to export*} uec {%EXPORT_PATH}{ENTER} {IF %FILE_NAME_OPTION="1".and.%file_exist=".T.", {y}, {}} {*Overwrite option for default file name*} {F6} {F10:2} {*//Export Settings Begin*} {%LPREF_DELIMITER}{ENTER} yyy ^M^J {ENTER} Y {*//Export Settings End*} {F10} {PLAY %LPREF_A4_DATEFORMAT} clco {%DPREF_DB_PATH}\%TABLE{ENTER}
Comment