 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Manu Guest
|
Posted: Fri Jun 27, 2003 2:11 pm Post subject: [VC++ & excel] Comment insérer une nouvelle CWorkSheet ? |
|
|
Après avoir inséré le code de l'activeX MS Spreadsheet 10 de VC++,
J'ai la possibilité d'écrire dans trois feuilles différentes.
J'aimerais créer une nouvelle feuille(CWorksheet), dans le CWorksheets,
avec la fonction expression.Add(Before, After, Count, Type):
Comment l'utilise-t-on? Quels sont les 4 fameux arguments à mettre?
Tentatives loupées:
CWorksheets _wSheets;
_wSheets = app.GetWorksheets();
1)
_wSheets.Add(COleVariant("Feuille2"),COleVariant("Feuille1"),COleVariant
("1"),COleVariant("xlWorksheet"));
2)
_wSheets.Add(COleVariant("1"),COleVariant("0"),COleVariant("1"),COleVari
ant("xlWorksheet"));
Merci
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Fri Jun 27 16:11:22 2003 depuis l'IP : 132.166.132.154 [VIP 180803936967]
|
|
| Back to top |
|
 |
manu Guest
|
Posted: Mon Jun 30, 2003 8:32 am Post subject: Re:[VC++ & excel] Comment insérer une nouvelle CWorkSheet ? |
|
|
Je me reponds a moi meme si la reponse interesse qq1 !!!
ColeVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
CSpreadsheet appExcel;
appExcel.Create("nom",0,rect,pChildFrm,0,NULL);
CWorksheets _wSheets;
_wSheets = appExcel.GetWorksheets();
_wSheets.Add(covOptional,COleVariant((short 1),covOptional,covOptional);
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Article poste via Voila News - http://www.news.voila.fr
Le : Mon Jun 30 10:32:25 2003 depuis l'IP : 132.166.132.154 [VIP 180803936967]
|
|
| Back to top |
|
 |
Le Bren Alexis Guest
|
Posted: Tue Jul 01, 2003 7:50 pm Post subject: Re: [VC++ & excel] Comment insérer une nouvelle CWorkSheet ? |
|
|
Une tres bonne doc sur le site de microsoft pour tout ce qui est "automate
office application".. ca m'a beaucoup servit :)
Tape "kb 253235" dans Google et tu tombera sur la page permettant de
telecharger OFFAUTMN.EXE qui est une doc + exemple. Tres bien fait la doc :)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|