Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

spalanivel

@spalanivel
About
Posts
73
Topics
44
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Add new sheet in Excel using mfc...
    S spalanivel

    Hi, I need to add worksheets(like sheet2,sheet3,...) with the below exising code. Now sheet1 is coming by default and able to write the contents. Existing Code: -------------- COleException objEx; // exception object Application objExcel; // excel application object // local var COleVariant vRet; // row index long nRow = 1; // range object Range objRange; // create the excel object objExcel.CreateDispatch( "Excel.Application", &objEx ); // show the application objExcel.SetVisible( COleVariant(short(FALSE)) ); // get the workbooks object vRet = objExcel.Workbooks2(); // set the workbooks object Workbooks objWorkbooks( V_DISPATCH( (LPVARIANT)vRet ) ); // adding the new workbook vRet = objWorkbooks.Add( COleVariant( (long)xlWorksheet ) ); // set the workbook object Workbook objWorkbook( V_DISPATCH( (LPVARIANT)vRet ) ); // adding the worksheet vRet = objWorkbook.Worksheets( COleVariant( (long)1 ) ); // set the worksheet object Worksheet objWorksheet( V_DISPATCH( (LPVARIANT)vRet ) ); How to add more sheets with the above code? Please help. I am using below header files;

    #include "XL5EN32.H"
    #include "excel9.h"
    #include "ExcelObject.h"

    Thanks, Pala

    C / C++ / MFC c++ database help tutorial question

  • Insert new row in Excel using MFC VC++
    S spalanivel

    I tried with the below codes but still no luck...

    csRange.Format("C%d", nRow );
    objWorksheet.Range( COleVariant(csRange), vtOptional);

    and objRange.Insert(COleVariant(-4121L), vtOptional); Following Error Message while i tried with the above code "Memeber Not Found".. Any other option? Just need to insert a new row i am using Excel 2007 and excel9.h header file. Thanks.

    C / C++ / MFC c++ com testing tools tutorial

  • Insert new row in Excel using MFC VC++
    S spalanivel

    Hi David, Thanks for your reply. I am using Excel 2007. Yes i tried with Insert method. I don't how to give the Parameter value; Below is my code:

    csRange.Format("C%d", nRow );
    // get the range
    vRet = objWorksheet.Range1( COleVariant( csRange ) );
    objRange.AttachDispatch( V_DISPATCH( (LPVARIANT)vRet ) );

    objRange.Insert(???) ********************************** sy****natx for Insert: objRange.Insert(const VARIANT &shift) ************************************** How to give the parameter value for Insert method? Waiting for your reply. Thanks, SPala

    C / C++ / MFC c++ com testing tools tutorial

  • Insert new row in Excel using MFC VC++
    S spalanivel

    Hi, I am using a VC++ MFC app to drive Excel through OLE Automation. I need to insert new row in the Excel. How to acheive this? *************** // Code Sample *************** // excel application object Application objExcel; // local var COleVariant vRet; // range object Range objRange; // set the workbooks object Workbooks objWorkbooks( V_DISPATCH( (LPVARIANT)vRet ) ); // adding the new workbook vRet = objWorkbooks.Add( COleVariant( (long)xlWorksheet ) ); // set the workbook object Workbook objWorkbook( V_DISPATCH( (LPVARIANT)vRet ) ); // adding the worksheet vRet = objWorkbook.Worksheets( COleVariant( (long)1 ) ); Worksheet objWorksheet( V_DISPATCH( (LPVARIANT)vRet ) ); // get the range vRet = objWorksheet.Range1( COleVariant( csRange ) ); objRange.AttachDispatch( V_DISPATCH( (LPVARIANT)vRet ) ); From the above code in objRange having the Row position as C8. Here need to insert a new row. Reg, SPala

    C / C++ / MFC c++ com testing tools tutorial

  • convert short to Cstring...
    S spalanivel

    Hi, short m_start_year; COleDateTime tm = COleDateTime::GetCurrentTime(); m_start_year = (short) tm.GetYear(); I need to convert this m_start_year to CString to pass a argument for below function. CString result_startdate = GetShowYear(m_start_year); CString GetShowYear(CString m_start_year) { // Here i will do the Inline query and get the show start date. } In the above code how to cast short to CString as the GetShowYear need to pass only CString value but from tm.GetYear() i am getting as "short" value. Any idea? Reg, SPa

    C / C++ / MFC database tutorial question

  • how to merge cells using msFlexgrid..
    S spalanivel

    Thanks for your reply. But the link explains the merging entire row values and i need to merge only the 2 adjacent cells not entire row. Please advice.

    C / C++ / MFC c++ tutorial question

  • how to merge cells using msFlexgrid..
    S spalanivel

    Hi, How to merge cells using msflexgrid vc++ application. Trying to merge two adjacent cells when they are having same value. m_Grid.SetMergeCells(1) is not working. Any idea?

    C / C++ / MFC c++ tutorial question

  • MS Flex Grid using VC++ Merge Cells not working...
    S spalanivel

    Hi, I am using MS Flexgrid 6.0 in my MFC VC++ application. Trying to merge cells when the adjacent cells having same value. Input: ------------------ Col1 Col2 Col3 ------------------ ABC BBC CCD BBV BBV DDC CCD CCD RRD And need the Outcome as; ------------------ Col1 Col2 Col3 ------------------ ABC BBC CCD BBV DDC CCD RRD From above 2nd and 3rd row the adjacent cells having the same value(BBV and CCD) and its merged. I tried with m_Grid.SetmergeCells(4) but its not working. How to acheive? Any sample code.. Reg, Palav.

    C / C++ / MFC c++ css tutorial question

  • Concurrent Updates using asp.net and mysql...
    S spalanivel

    Hi, I am developing small web application(ASP.NET and MySQL)with CURD Operations which has one table and has 30 columns. my ques: Suppose If more than one person tries to modifies the same row(record) then it should throw message as "Someone already editing the record". I find out optimistic and pessimistic locking for the above problem. How to achieve this one and which method to use any sample application which will be very useful Reg, Subbu

    ASP.NET csharp asp-net mysql help tutorial

  • Access Web application using IP from others system(In Office)...
    S spalanivel

    Hi, I have developed small web application using ASP.Net and MySQL. I need to access this application using IP address from my friend system(In Office). Is it possible? I am having Windows XP. Note: From Windows 2003 Server I am hosting that web application and changed localhost to IP Address and its possible to access from others system. (ie) Server IP address (http://192.145.1.20/VDR/Login.aspx) How to acheive by Windows XP with IIS? Thanks, Subbu

    ASP.NET csharp asp-net mysql sysadmin windows-admin

  • Access Web application using IP from others system(In Office)...
    S spalanivel

    Hi, I have developed small web application using ASP.Net and MySQL. I need to access this application using IP address from my friend system(In Office). Is it possible? I am having Windows XP. Note: From Windows 2003 Server I am hosting that web application and changed localhost to IP Address and its possible to access from others system. (ie) Server IP address (http://192.145.1.20/VDR/Login.aspx) How to acheive by Windows XP with IIS? Thanks, Subbu

    Web Development csharp asp-net mysql sysadmin windows-admin

  • How to Store Session Variable(UserName) in a table with MySQL....
    S spalanivel

    Hi, I want to save the session UserName in a table using mysql. I have the history of my base table(auction) update, delete, create information will get stored in a backup table(auction_log). I want to save username(who currently loged in and modifies the record in a table) in too the auction_log table. reg, Subbu

    ASP.NET mysql tutorial announcement

  • Convert String to int zero is missing....
    S spalanivel

    Thanks for your quick response. But one question how to get the final value as a integer rather than string. Any Other Option? int iResult = 06461; /// Output. REg, Sbubbu

    C# tutorial

  • Convert String to int zero is missing....
    S spalanivel

    Thanx for your reply. How to keep that as a string and expand it. Example: string strInput = AD01234-AD01237; This need to be Expand like AD01234,AD01235,AD01236,AD01237. - Spliting the string in to 2 with -(hypen) - From 1st string process from the last and get only numbers and vice versa. - finally by using the For loop process from starting Number to end will be expanded. But in this case need to convert to int then only it can be possible. how to achieve this? Reg, subbu

    C# tutorial

  • Convert String to int zero is missing....
    S spalanivel

    Hi, Seem to be very simple but it's not working with following conversion methods. Trying to convert from string to integer 0's missing in the Output. string strInput = "06461"; int iResult = Convert.ToInt32(strInput) (or) int iResult = int.Parse(strInput); Output : 6461 (note 0's missing) How to get the zero also in the output as 06461. Reg, Subbu

    C# tutorial

  • Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)...
    S spalanivel

    Thanks for your prompt reply. Here my question suppose If I am having two RichTextBox and Shall I want to create two ContextMenu Control or I can use One and refer two Rich textbox. Please explain.

    C# help tutorial question

  • Problem with RichText Box(Right Click Cut/Copy/Paste/SelectAll)...
    S spalanivel

    Hi, How to get the menu like Cut,Copy,Paste,SelectAll in richTextBox. Any idea? Thanks, Subbu

    C# help tutorial question

  • While Splitting the String* it throws Error....
    S spalanivel

    Thanks for your reply.. Actually while executing the Split statement we are storing the values String Array and it doesn't hold that much size to handle. It will automatically goes to catch and print the error message. After some processing the Size will be increased and it holds now 40 MB of datas and store it in string array. Thus it makes problem. Thanks, Subbu

    C / C++ / MFC help tutorial question

  • Splitting 2 MB of datas....
    S spalanivel

    Hi, In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data) But it was working for minminum (ie 50 KB of datas like 0's and 1's). How to over come this error? Very urgent.. Below is the code... CString strCommand; // Holds 2MB of datas like 0's and 1's... System::String* strDataReceived = ""; strDataReceived = strCommand; __wchar_t split __gc[] = new __wchar_t __gc[1]; split [0] = '\n'; String *strSplitCommand[] = strDataReceived->Trim()->Split (split); Please help.. Reg, Subbu

    Managed C++/CLI help tutorial question

  • While Splitting the String* it throws Error....
    S spalanivel

    Hi, In the strCommand I am having 2MB of Data and when i am trying to split with the new line it was throwing error.(to loop through all the data) But it was working for minminum (ie 50 KB of datas like 0's and 1's). How to over come this error? Very urgent.. Below is the code... CString strCommand; // Holds 2MB of datas like 0's and 1's... System::String* strDataReceived = ""; strDataReceived = strCommand; __wchar_t split __gc[] = new __wchar_t __gc[1]; split [0] = '\n'; String *strSplitCommand[] = strDataReceived->Trim()->Split (split); Please help.. Reg, Subbu

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups