2012-03-23 42 views

Trả lời

6

Bạn có thể sử dụng ActiveX trực tiếp từ MATLAB:

xlswrite('test.xls',1) % # create test file 

e = actxserver('Excel.Application'); % # open Activex server 
ewb = e.Workbooks.Open('c:\test\test.xls'); % # open file (enter full path!) 
ewb.Worksheets.Item(1).Name = 'new name'; % # rename 1st sheet 
ewb.Save % # save to the same file 
ewb.Close(false) 
e.Quit 

Hãy cẩn thận khi thử nghiệm, nó ghi đè lên file gốc. Tạo bản sao lưu.

Các vấn đề liên quan