Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.
Tue Nov 14, 2017 11:15 pm
Hi,
I would like to know how can I change the text of A1 cell from my already opened excel file.
I can see in the samples but it always uses Dim workbook As New Workbook()
Pls le me know
-
pwillard
-
- Posts: 2
- Joined: Tue Nov 14, 2017 7:09 am
Wed Nov 15, 2017 3:18 am
Hello,
Thanks for your inquiry.
You could load an existing workbook like below.
- Code: Select all
'Load Workbook
Dim workbook As New Workbook()
workbook.LoadFromFile("sample.xlsx")
'Edit Text
Dim sheet As Worksheet = workbook.Worksheets(0)
sheet.Range("A1").Text = "E-iceblue"
Sincerely,
Jane
E-iceblue support team
-
Jane.Bai
-
- Posts: 1156
- Joined: Tue Nov 29, 2016 1:47 am
Wed Nov 15, 2017 3:25 am
System.IO.IOException: 'The process cannot access the file 'C:\Users\Administrator\Desktop\test.xlsx' because it is being used by another process.'
I am getting this
-
pwillard
-
- Posts: 2
- Joined: Tue Nov 14, 2017 7:09 am
Wed Nov 15, 2017 3:51 am
Hello,
Thanks for your quick response.
Sorry it is not possible to edit the file when it is occupied by other processes.
You need to close the file first.
Sincerely,
Jane
E-iceblue support team
-
Jane.Bai
-
- Posts: 1156
- Joined: Tue Nov 29, 2016 1:47 am