C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[VC++ & excel] Comment insérer une nouvelle CWorkSheet ?

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
Manu
Guest





PostPosted: Fri Jun 27, 2003 2:11 pm    Post subject: [VC++ & excel] Comment insérer une nouvelle CWorkSheet ? Reply with quote



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





PostPosted: Mon Jun 30, 2003 8:32 am    Post subject: Re:[VC++ & excel] Comment insérer une nouvelle CWorkSheet ? Reply with quote



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





PostPosted: Tue Jul 01, 2003 7:50 pm    Post subject: Re: [VC++ & excel] Comment insérer une nouvelle CWorkSheet ? Reply with quote




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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.