Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting a few cells from an excel spreadsheet
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01371276
Message ID:
01375488
Vues:
8
>The line
>
>oExcel.workbook.close
>
>causes an error that no member named workbook exists.

Here is what I currently have (39 is not the best format, though)
	IF '12' $ .VERSION && XL 2007
* Kevin Delaney's suggestion & Cetin Basoz suggestion
			.ActiveWorkbook.SAVEAS(m.tcDestination, 39) && xlExcel7
			.ActiveWorkbook.Saved = .T.
			.ActiveWorkbook.CLOSE(0)
		ELSE
			.WorkBooks(1).SAVEAS(m.tcDestination)
		ENDIF

		.ScreenUpdating = .T.
		.DisplayAlerts = .T.
	ENDWITH

CATCH TO loError
	lcError = Log_Error(m.loError)
FINALLY
	IF VARTYPE(m.loExcel) = 'O'
		WITH loExcel
			.ScreenUpdating = .T.
			.DisplayAlerts = .T.
			.QUIT()
		ENDWITH
	ENDIF
ENDTRY
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform