Reading from xls or xlsx - with style

Richmond Mathewson richmondmathewson at gmail.com
Tue Jan 16 16:43:47 EST 2018


If you export html from Open Office Calc / Excel, then import it into a 
textfield, and then
move it into a Basic Table Field like this:

set the columnDelimiter to TAB
set the htmlText of fld "fSPREAD" to the text of fld "fTEXT"

where field "fSPREAD" is a table field

all the styling from your original spreadsheet file [ .ods / .xls ] will 
be preserved.

The ONLY problem is that the data is spreas apart over many "cells", but 
that should be capable
of being cleared up comparatively simply.

Richmond.


On 16/1/2018 11:32 pm, Richmond Mathewson wrote:
> If you could find a way to export a tab-delimited RTF file from your 
> spreadsheet program
> you might be laughing.
>
> Richmond.
>
> On 16/1/2018 10:54 pm, Richmond Mathewson wrote:
>> Open Office can read Excel files and successfully export them to 
>> .html preserving ALL formatting!
>>
>> As Open Office is open source code . . . .
>>
>> https://www.openoffice.org/
>>
>> I have just imported a styled .html file exported from an Open Office 
>> Spreadsheet into a textField in LiveCode 7.1.4
>>
>> Richmond.
>>
>> On 16/1/2018 10:32 pm, zryip theSlug via use-livecode wrote:
>>> In the Excel Lib, the command XCEL_Range_FontStyle_Get is returning
>>> the style of the whole cell or range. We have no function to read the
>>> style of each char, at this moment.
>>> However, both VBA and AppleScript are offering this possibility, so
>>> this is a function we can add. A possible solution would consist to
>>> explore the style of each chars in a cell, then return the result in
>>> html to have it directly usable in LiveCode. I'm not sure of the
>>> performances of this approach, though. It will depend on how many
>>> cells the sheet have and how many text each cells are containing.
>>>
>>> On Tue, Jan 16, 2018 at 8:23 PM, Matthias Rebbe via use-livecode
>>> <use-livecode at lists.runrev.com>  wrote:
>>>> Ben,
>>>>
>>>> i am uising Spreadlib and Excel Libary. Both do not take care for text format.
>>>> At least i am not aware of it.
>>>>
>>>> Regards,
>>>> Matthias
>>>>
>>>>
>>>>
>>>> Matthias Rebbe
>>>> Tel +49 5741 310000
>>>>https://matthiasrebbe.eu  <https://matthiasrebbe.eu/>‌
>>>>
>>>>> Am 16.01.2018 um 19:10 schrieb Ben Rubinstein via use-livecode <use-livecode at lists.runrev.com  <mailto:use-livecode at lists.runrev.com>>:
>>>>>
>>>>> I'm aware that there are a couple of libraries floating around for reading Excel documents - do any of them allow the formatting of runs of text within cells to be read? I want to import some data where some of the text in a cell may contain some parts which are in italics or bold. Are there existing libraries that support this use?
>>>>>
>>>>> Many thanks,
>>>>>
>>>>> Ben
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com  <mailto:use-livecode at lists.runrev.com>
>>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>




More information about the use-livecode mailing list