[Pythonmac-SIG] accessing .xsl files

TracyS.Ruggles TracyS.Ruggles
Thu, 10 Apr 2003 13:15:14 -0500


Is there a mac python module that could do something like this (or a 
module or two that I could use to create an interface like this):

# --- samply.py
import osax

ExcelProxy = osax.Application('Microsoft Excel')
# 2 options
range = ExcelProxy.tell("return Range 'A1:F12' from Document 1")
range = ExcelProxy.Document(1).Range('A1','F12')

data = range.Value

# --- end


On Thursday, April 10, 2003, at 11:51 AM, Paul Berkowitz wrote:

> On 4/10/03 9:20 AM, "Edd Thompson" <euphoriadj@adamswells.com> wrote:
>
>> I need to get data from an excel file manipulate it and either create
>> two new excel files or probably more easily create an html table.  Is 
>> a
>> library, module or best yet a tutorial on extracting data from an xls?
>>
>> And to make things worse I will be coding this on OS X  but it  will
>> eventually be running
>>   on a windows NT system.
>
> You should extract your data from the Excel file either by AppleScript 
> or
> Visual Basic. If you're going to be running it on Windows then use VBA,
> which will be same on both if you code it in OS X. (VBA Mac is VBA 5.0
> whereas the current Office VBA on Windows in VBA 6.0. Whatever works 
> on the
> Mac will work on Windows, but occasionally not vice-versa.) You can 
> account
> for different types of file paths on the two systems within VBA.