Çalışma Sayfasına TextBox nasıl eklenir/eklenir
Excel’de Çalışma Sayfasına Metin Kutusu Ekle
Excel programında (07 ve üstü sürümlerde), metin kutularını ekleyebileceğiniz iki yer bulunmaktadır. Biri “ekle-şekiller"de, diğeri de “Ekle” seçeneğinin üst menüsünün sağ tarafında.
yöntem biri:
yöntem iki:
Nasıl oluşturulur
Metin Kutusu, yatay veya dikey metinle oluşturulabilir.
- İlgili seçeneği (yatay veya dikey) seçin.
- Sayfada sol tuşa basın.
- Sol tuşa basılı tutun ve sayfada bir mesafe sürükleyin.
- Sol tuşu bırakın.
Şimdi bir metin kutusuna sahipsiniz.
Aspose.Cells’te Çalışma Sayfasına Metin Kutusu Ekle
Çalışma sayfasına topluca TextBox eklemeniz gerektiğinde, manuel ekleme yöntemi açıkça bir felakettir. Bu sizi rahatsız ediyorsa, bu belge size yardımcı olacaktır. Aspose.Cells, kodunuzda toplu eklemeler yapmanıza olanak sağlayan bir API sunar.
Aşağıdaki örnek kod bir metin kutusu oluşturur.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = ""; | |
if (!System.IO.Directory.Exists(dataDir)) | |
{ | |
System.IO.Directory.CreateDirectory(dataDir); | |
} | |
// Open an Excel file. | |
//Workbook workbook = new Workbook(dataDir+ "Book_SourceData.xlsx");//If you want to insert a text box in an existing file, use this code. | |
// Create an object of the Workbook class | |
Workbook workbook = new Workbook(); | |
// Access first worksheet from the collection | |
Worksheet sheet = workbook.Worksheets[0]; | |
// Add the TextBox to the worksheet | |
sheet.TextBoxes.Add(6, 10, 100, 200); | |
//Save.You can check your text box in this way. | |
workbook.Save("result.xlsx", SaveFormat.Xlsx); |
Benzer bir dosya olan sonuç dosyasını alacaksınız. Dosyada aşağıdakileri göreceksiniz: