+ Reply to Thread
Results 1 to 1 of 1

Problem: How to copy excel sheet in C++

  1. #1
    Registered User
    Join Date
    10-06-2005
    Posts
    1

    Problem: How to copy excel sheet in C++

    Hi,

    Anyone here know how to use the sheet->copy() function to copy the sheet in the same workbook using c++. I am writing a software in C++ to duplicate an active sheet in the same workbook.

    I know that in VBA script, the copy function like below:
    Worksheets("Sheet1").Copy After:=Worksheets("Sheet3")

    Anyone know what is the argument to fill in for the function copy? If I left the function copy with no argument below, it will copy the sheet and put it to a new workbook. My intent is to copy the sheet into new sheet within the same work book. I know how to get the sheet pointer for the last sheet, but this function cannot take the sheet pointer as the argument.

    The coding below is working fine if I remove the copy function. Anyone know how to do this?

    Below is some of my coding:

    Please Login or Register  to view this content.
    Last edited by sgwong; 10-06-2005 at 09:59 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1