Ruby'de Çalışma Sayfalarını Kopyalama ve Taşıma

Aspose.Cells - Çalışma Sayfalarını Kopyalama ve Taşıma

Çalışma Kitabındaki Çalışma Sayfalarını Kopyalama

Çalışma sayfasını kullanarak kopyalamak içinYakut içinde Aspose.Cells for Java , Aramakopya_çalışma sayfası yöntemikopya çalışma sayfaları modül. Aşağıda kod örneğini görebilirsiniz.

Yakut Kodu

 def copy_worksheet(workbook)

    # Create a Worksheets object with reference to the sheets of the Workbook.

    sheets = workbook.getWorksheets()

    # Copy data to a new sheet from an existing sheet within the Workbook.

    sheets.addCopy("Sheet1")

    # Saving the modified Excel file in default (that is Excel 2003) format

    workbook.save(@data_dir + "Copy Worksheet.xls")

    puts "Copy worksheet, please check the output file."

end 

Çalışma Sayfalarını Çalışma Kitabı İçinde Taşıma

Çalışma sayfasını kullanarak taşımak içinYakut içinde Aspose.Cells for Java , Aramamove_worksheet yöntemikopya çalışma sayfaları modül. Aşağıda kod örneğini görebilirsiniz.

Yakut Kodu

 def move_worksheet(workbook)

    # Get the first worksheet in the book.

    sheet = workbook.getWorksheets().get(0)

    # Move the first sheet to the third position in the workbook.

    sheet.moveTo(2)

    # Saving the modified Excel file in default (that is Excel 2003) format

    workbook.save(@data_dir + "Move Worksheet.xls")

    puts "Move worksheet, please check the output file."

end 

Çalışan Kodu İndir

İndirmek**Çalışma Sayfalarını Kopyalama ve Taşıma (Aspose.Cells)**aşağıda belirtilen sosyal kodlama sitelerinin herhangi birinden: