Hi Friends,
With the above mentioned code i am making necessary processing on the excel file. The Excel version i am using is Excel 2003 and i can open unprocessed and processed files in that excel version.
When these processed files reached to the client he states that they are not Excel 2003 files but Excel 2000 or Excel 97 files. Any suggestions or method to know which Excel version a .xls file belong.
Local loX
loX = Createobject("EXCEL.application")
loX.Workbooks.Open( Fullpath(myExcelFile))
loX.Columns("A:IV").Select
loX.Selection.NumberFormat = "@"
lcROWTOTCOUNT=loX.Cells.SpecialCells(11).Row
lcCOLTOTCOUNT=loX.Cells.SpecialCells(11).Column
For lcROWCOUNTER = 1 To lcROWTOTCOUNT
For lcCOlCOUNTER = 1 To lcCOLTOTCOUNT
If Type('loX.Cells(lcROWCOUNTER,lcCOlCOUNTER).Value')='N'
loX.Cells(lcROWCOUNTER,lcCOlCOUNTER).Value = Padl(Alltrim(Str(loX.Cells(lcROWCOUNTER,lcCOlCOUNTER).Value,14)),8,'0')
Endif
Next
NEXT
loX.Columns("A:IV").Select
loX.Selection.Columns.AutoFit
loX.DisplayAlerts = .F.
loX.Save()
loX.Workbooks.Close()
Release loX
Thanks.