General information
Category:
COM/DCOM and OLE Automation
Let me know if I can be of any help.
>David,
>
>Thank you very much.
>I think that is all I need.
>
>I'm finishing testing the importing of text files -the most difficult thing was to create an interface to allow users to map fixed lenght files- , Excel is next, then DBFs, then XML. So far so good, problem is, I need to deliver this on Tuesday morning.
>
>
>>lcFile = "MyWorkBook.xls"
>>oExcel = CreateObject("Excel.Application")
>>oWorkBook = oExcel.WorkBooks.Open(lcFile)
>>oSheet = oWorkBook.Sheets(1)
>>lcUsedRange = oSheet.UsedRange.Location
>>If lcUsedRange == "$A$1"
>> * Sheet is Empty
>>EndIf
>>*- End of Snippet -*
>>
>>Maria, this is quick code. I am doing this from memory. If you would like some real code let me know and I will fish through some stuff. If you want to check cell by cell:
>>
>>oSheet.Cells(nRow,nCol).Value && True value of cell (.Null. is possible)
>>oSheet.Cells(nRow,nCol).Text && value of cell returned as Character
>>
>>Let me know if you want me to fill in the blanks with specifics (named files, sheets, etc.)
>>
>>- David -
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only