Hi FrD
I'm not sure if this is you are after (I have never used an editor
directly on the TW's htmlcode).
cmari has made a script to show all kinds of fields in a TW.
I use it to fetch fieldnames and values from tiddlers with a specified
tag.
You could copy/paste the resulting table into your spreadsheet:
http://groups.google.com/group/TiddlyWiki/browse_thread/thread/13e5a545fe6f8698/68cdde699c6f5d8a?hl=en&q=#68cdde699c6f5d8a
This is the script I use (derived from the thread above)
It fetches fieldnames and values from all tiddlers tagged with the
title of the tiddler in which it is invoked :
<script label="SomeLabelOfYourChoice" title="TitleOfYourChoice">
var here=story.findContainingTiddler(place);
if (!here) return;
var title=here.getAttribute("tiddler");
var tiddler=store.getTiddler(title);
var out=[]; var fmt='[[%0]]: %1|'; var fmt2='\n|[[%0]]|';
var tids=store.sortTiddlers(store.filterTiddlers("[tag
[("+tiddler.title+" AND NOT Reference)]]"), "modified");
for (var i=0; i<tids.length; i++) {
out.push(fmt2.format([tids
[i].title]));
for (var f in tids[i].fields)
out.push(fmt.format
([f,tids[i].fields [f]]));
}
return out.join('|');
</script>
Hope that it might help you...
Regards Måns Mårtensson
On Apr 22, 2:53 pm, FrD <[email protected]> wrote:
> Hello,
>
> I'd like to read the first line of a csv file (on the local
> filesystem) in order to get the names of the fields. I will then use
> them in a drop-down menu.
> Until now I read the entire file with the core function LoadFile which
> takes care of the type of the browser. I then search the texte for the
> first "\n", and split according to the ";".
> But it's kind of stupid if the file is large !!
> If anybody has a clue ..
>
> Thanks in advance.
>
> FrD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---