Excel and TrackChanges

P

pierre_py

I have a problem with pycom automation with excel.
If i use the following in my excel_wrapper:
"""
self.Workbook.Save()
self.Workbook.HighlightChangesOptions(When=1)
self.Workbook.ListChangesOnNewSheet = True
"""
I don't get any history worksheet. If i use 2 (xlAllChanges) or 3
(xlNotYetReviewed), i get the history worksheet but with all results.

I use Office 2k sp1.

thanks in advance
 
G

Gerard Flanagan

pierre_py said:
I have a problem with pycom automation with excel.
If i use the following in my excel_wrapper:
"""
self.Workbook.Save()
self.Workbook.HighlightChangesOptions(When=1)
self.Workbook.ListChangesOnNewSheet = True
"""
I don't get any history worksheet. If i use 2 (xlAllChanges) or 3
(xlNotYetReviewed), i get the history worksheet but with all results.

I use Office 2k sp1.

thanks in advance

What does '1' represent? The first hit in Google for
"HighlightChangesOptions" suggests it may be 'xlSinceMyLastSave', so
maybe there are no changes to show? What happens if you comment out
"self.Workbook.Save()", or move it to below the other two lines?

Gerard
 
P

pierre_py

If i move the Save after the HighlightChangesOptions it will popup a
message saying it can only be used when workbook is saved.

The problem is actually not only in python, i figured out that the
samples in msdn (which do the same) don't work in VBA also (if i give
my macros a shortcut).

I have now fixed-it with ApplyAllChanges(), which gives me thing i need
(i need the track changes just to create a log file of whats
happening).

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,285
Messages
2,571,415
Members
48,107
Latest member
jigyasauniversity

Latest Threads

Top