Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel XLS/XLSX to CSV
Message
De
17/05/2016 09:23:32
 
 
À
17/05/2016 08:37:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01636368
Message ID:
01636495
Vues:
72
There is not a specific method to do this. There are methods to retrieve the row and column counts. There is a method to retrieve the cell value and data type. Start two FOR-ENDFOR loops and then read each cell and write to your output. If 'clsXLSXReader' is the name of the class, lnWB is the workbook number as loaded, and lnSh is the sheet number to read, then something like:
FOR lnRow=1 TO thisform.clsXLSXReader.GetLastRowNumber()
  FOR lnCol=1 TO thisform.clsXLSXReader.GetMaxColumnNumber()
     lcCellValue = TRANSFORM(NVL(thisform.clsXLSXReader.GetCellValue(lnWB, lnSh, lnRow, lnCol), ""))
     && now write the cell value...
  ENDFOR
ENDFOR
I used the NVL() function to not write a NULL value if a cell is not populated, but instead an empty value.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform