Code Comments
Programming Forum and web based access to our favorite programming groups.Hi All, We have created a spreadsheet file(compatible with open office and ms office) using a Smalltalk application. We would like to change the font and the color of the text, i.e. we have to write in to the file in a specified format. How can we do so from the Smalltalk application[VW7.3]. Thanks in Advance, -- Suresh Kumar
Post Follow-up to this message"Suresh Kumar" <suresh@ivasystems.com> wrote: > Hi All, > > We have created a spreadsheet file(compatible with open office and ms > office) using a Smalltalk application. > We would like to change the font and the color of the text, i.e. we have t o > write in to the file in a specified format. > How can we do so from the Smalltalk application[VW7.3]. This is pretty independent of Smalltalk. You did not specify in what format your spreadsheet file is written. If it's CSV, then as far as I know you can't specify things such as font or text color. If it's another format, you would need to check how this format specifies these attributes. Cheers, Hans-Martin
Post Follow-up to this messageIf anyone knows of api for talking to .xls files I'm very interested also. I have found some references to using ODBC to get data from them.
Post Follow-up to this messageSame here. If your company allows it, this sounds like a great open source contribution. jim.thompson@lagosantafe.com wrote: > If anyone knows of api for talking to .xls files I'm very interested > also. > > I have found some references to using ODBC to get data from them. >
Post Follow-up to this message"Suresh Kumar" <suresh@ivasystems.com> wrote: >Hi All, > >We have created a spreadsheet file(compatible with open office and ms >office) using a Smalltalk application. >We would like to change the font and the color of the text, i.e. we have to >write in to the file in a specified format. >How can we do so from the Smalltalk application[VW7.3]. > >Thanks in Advance, There needs to be better API's for OpenOffice to do this sort of thing.. And then there needs to be better bindings from Smalltalk to C++ to tie into it. Either way, I'm sure you can hack up OpenOffice a bit to get the job done, but it might not be pretty or easy. Ian --- http://www.upright.net/ian/
Post Follow-up to this messageI tried looking into that. I wanted to create a filter to convert .xls files to tab separated files. The API wasn't inspiring. Ian Upright wrote: > "Suresh Kumar" <suresh@ivasystems.com> wrote: > > > > > There needs to be better API's for OpenOffice to do this sort of thing.. A nd > then there needs to be better bindings from Smalltalk to C++ to tie into i t. > Either way, I'm sure you can hack up OpenOffice a bit to get the job done, > but it might not be pretty or easy. > > Ian > > --- > http://www.upright.net/ian/
Post Follow-up to this messageI'm not familiar with Open Office but to access the Microsoft Office products such as Word, Excel, Outlook, etc. I'd recommend using the OLE (Object Linking and Embedding) interface. Using a custom built OLE wrapper class, I was able to build and manipulate Excel spreadsheets, call Word spellcheck, lookup Outlook addresses, etc. for the programs written for my commercial clients. Caveat: I wrote these under VisualAge Smalltalk versions 4.02-6.01 using IBM's OLE Automation Object class. I also put a sample MS Word Spell Check example on D. Pennington's Totally Object Web site: http://www.totallyobjects.com/vafree.htm I'm not an expert with VisualWorks, but it appears you could use the DLLConnect feature to build a similar OLE Automation class and call the MS OLE DLLs. I've called MS DLLs numerous times under VisualAge Smalltalk and it was straight forward, especially if you've used MS Visual Studio. An alternative is to ask a vendor if they would consider developing a wrapper class for commerical resale... James Wong Logical Answers Inc. jhwong@LogicalAnswers.com
Post Follow-up to this messageI'm looking at http://msdn.microsoft.com/library/d.../> erations.asp This may be viable. Thanks for the info on OLE. James Wong wrote: > I'm not familiar with Open Office but to access the Microsoft Office > products such as > Word, Excel, Outlook, etc. I'd recommend using the OLE (Object Linking and > Embedding) > interface. Using a custom built OLE wrapper class, I was able to build and > manipulate > Excel spreadsheets, call Word spellcheck, lookup Outlook addresses, etc. for > the programs > written for my commercial clients. > > Caveat: I wrote these under VisualAge Smalltalk versions 4.02-6.01 using > IBM's OLE > Automation Object class. I also put a sample MS Word Spell Check example on > D. Pennington's Totally Object Web site: > http://www.totallyobjects.com/vafree.htm > > I'm not an expert with VisualWorks, but it appears you could use the > DLLConnect > feature to build a similar OLE Automation class and call the MS OLE DLLs. > I've called > MS DLLs numerous times under VisualAge Smalltalk and it was straight > forward, > especially if you've used MS Visual Studio. > > An alternative is to ask a vendor if they would consider developing a > wrapper class > for commerical resale... > > James Wong > Logical Answers Inc. > jhwong@LogicalAnswers.com
Post Follow-up to this messageI would very like to have a connection to OpenOffice, but the whole stuff is much more difficult than working with MSWord or MSExcel. They go more and more with Java and though OpenOffice is platform independent they have "strange" unusual interfaces - and they produce documentation over documentation and most of it is not really helpful - I think having a Smalltalk browser on top of OpenOffice would help them much much more. In general we wrote StarBasic libraries, which we call from our VA Smalltalk systems - but even here StarBasic is pretty bad compared against VBA. I think if one want to start with this stuff, they should have a look at the Python connection ... pretty much the same should be possible with Smalltalk - and the Python programmer mentioned, that all untyped languages are better suited for a wrapper than typed languages. Marten Thomas Gagne schrieb: > I tried looking into that. I wanted to create a filter to convert .xls > files to tab separated files. The API wasn't inspiring. > > Ian Upright wrote: >
Post Follow-up to this messageSuresh, There are examples for manipulating Excel files in the COM Interface code that ships with VW. I've used this from VW 7.x on Windows to populate and format Excel files in the past. Brett Suresh Kumar wrote: > Hi All, > > We have created a spreadsheet file(compatible with open office and ms > office) using a Smalltalk application. > We would like to change the font and the color of the text, i.e. we have to > write in to the file in a specified format. > How can we do so from the Smalltalk application[VW7.3]. > > Thanks in Advance, > > > > -- > Suresh Kumar
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.