Importing from Excel workbook with hidden columns  
Author Message
KarlShare





PostPosted: Visual FoxPro General, Importing from Excel workbook with hidden columns Top

Hi!
I cannot use IMPORT FROM <myworkbook> TYPE XL8 because every time there are hidden columns in the workbooks, this command fails to get data from them.

How can I avoid such a problem
Is there a way to force IMPORT command to get data from the hidden columns
or
is there a way to unhide the columns with VFP before I issue the IMPORT command

Any help would be greatly appreciated. Thank you!

Karl



Visual FoxPro2  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, Importing from Excel workbook with hidden columns Top

Warning: Untested, writing off the top of my head.

lcXLS = "c:\some path\myFile.xls"
oExcel = createobject("Excel.application")
with oExcel
.Workbooks.Open(m.lcXLS)
.Activeworkbook.ActiveSheet.UsedRange.Columns.Hidden = .f.
.Activeworkbook.Save
.Quit
endwith