Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i have a problem with my script for convert GDB to Excel.

  if s=='xls':
        reader=FMEReader("GEODATABASE_FILE")
        reader.open(param_filename_gdb)
        writerXls= FMEWriter("XLS_ADO")
        new_schema = export + "Excel\\" + filenameGDB+  ".xls"
        writerXls.open(new_schema)

        schemaXls=FMEFeature()
        while reader.readSchema(schemaXls):
            log.logFeature(schemaXls)
            writerXls.addSchema(schemaXls)
        features=FMEFeature()
        while reader.read(features):
           log.logFeature(features)
           writerXls.write(features)

        reader.close() 
        writerXls.close()

The creation of my Xls works but the logger of FME tell me : MS Excel Writer: Connection failed. Connection string Provider=Microsoft.Jet.OLEDB.4.0;Data Source=null;Extended Properties="Excel 8.0;HDR=YES"'. Provider errorThe table is not in the expected format.' Failed to open writer

But the logger tell : MS Excel Writer: Closing `C:\Excel\test2.xls' . Write operation complete
The code is in Startup Python Script.

Why ? Thanks

share|improve this question
    
It is not FME it is Excel - please read - stackoverflow.com/questions/298726/… –  Mapperz Jun 15 '11 at 14:47
    
It's very strange because the same code in PythonCreator works very well !!! –  twisig Jun 15 '11 at 15:16
1  
I think the more relevant question is why you are using a script to convert GDB to Excel? FME will let you do this much more easily in a workspace - then you can run that workspace programmatically if you need to, passing in parameters as required. Check out my blog post on the subject at: evangelism.safe.com/fmeevangelist69 –  Mark Ireland Jun 15 '11 at 16:19
    
Because it's a dynamic workbench and it's very fast with Python... –  twisig Jun 16 '11 at 2:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.