Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I need a little hand with this part of my routine.
I can export to Excel 2010 but not to 2016.
The problem seems to be when the routine opens the file.
Because when the file is already open it works, the data is written in the this file and the routine opens a empty second one.
I don't know if this is enougth Information... please help
(defun LM:Open ( target / Shell result ) (setq Shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application")) (setq result (and (or (eq 'INT (type target)) (setq target (findfile target))) (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-invoke (list Shell 'Open target)) ) ) ) ) (vlax-release-object Shell) result ) (defun xls ( Data-list Data-list2 Data-list3 ColHide Name_list pnumber filename / *Aplexcel* *books-colection* Currsep *excell-cells* *new-book* *sheet#1* *sheet-collection* col cols iz_listo row cell file standort username) (defun Letter (N / Res TMP) (setq Res "") (while (> N 0) (setq TMP (rem N 26) TMP (if (zerop TMP)(setq N (1- N) TMP 26) TMP) Res (strcat (chr (+ 64 TMP)) Res) N (/ N 26))) Res) (setq *AplExcel* (vlax-get-or-create-object "Excel.Application")) (setq file (cond ((= Typ. "COMAX") (if (findfile filename)(findfile filename)(findfile "COMAX_Vorlage.xltx"))) ((= Typ. "FERBOX")(if (findfile filename)(findfile filename)(findfile "FERBOX_Vorlage.xltx"))) ((= Typ. "EBEA")(if (findfile filename)(findfile filename)(findfile "EBEA_Vorlage.xltx"))) ((= Typ. "ACINOXplus")(if (findfile filename)(findfile filename)(findfile "ACINOXplus_Vorlage.xltx"))))) (LM:Open file)
Solved! Go to Solution.