Yeni Çalışma Kitapları Oluşturun ve Kaydedin

Geçiş İpuçları:

\1. Çalışma Kitabı nesnesi oluştur \2. Mevcut Çalışma Sayfasını alın. \3. Herhangi bir hücreye biraz metin ekleyin. \4. Çalışma Kitabını kaydedin.

VSTO

Aşağıda VSTO için kod örneği verilmiştir

  Excel.Workbook newWorkbook = this.Application.Workbooks.Add();

 Excel.Worksheet worksheet = newWorkbook.ActiveSheet;

 Excel.Range cells = worksheet.Cells;

 cells.set_Item(1,1,"Some Text");

 newWorkbook.Save();

Aspose.Cells

Aspose.Cells için kod örneği aşağıdadır

  Workbook newWorkbook = new Workbook();

 Worksheet worksheet = newWorkbook.Worksheets.Add("New Sheet");

 Cells cells = worksheet.Cells;

 cells[0,0].PutValue("Some Text");

 newWorkbook.Save(fileName);

İndirmek