Author Topic: Exporting data in Excel format  (Read 3462 times)

AnonymousPostings

  • Newbie
  • *
  • Posts: 49
Exporting data in Excel format
« on: July 01, 2010, 06:26:26 AM »
is it possible to convert the database to any other format, i.e. microsoft excel? and if it is possible. which method could/should i use to find that database and convert it?

thank you.
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 401
  • Here to help you
Re: Exporting data in Excel format
« Reply #1 on: July 01, 2010, 06:27:28 AM »
Yes you can convert your data inside HyperNext to any format such as Excel but of course you need the format specification.

Basically you just write your field values to a file, but after every field value just write the required separator, perhaps a TAB as in tab delimited data.
Its just the reverse procedure when importing formatted data into your database.

The Built-In help on the menu - called Guide - has a example showing how to write text to a file, also an example of binary data which is more relevant for formatted outputs

Code: [Select]
@ Write to a named file
Local fname,fvar,fdets,ftypes,fpaths,fnames,fextens
Local findex,n
Local comma,char

@ delimiter
Put ',' into comma

@ File name
Put 'test1.csv' into fname

@ Create and open file
FileGet(fname,fvar,fdets,ftypes,fpaths,fnames,fextens)
CreateBFile(fvar,findex,n)

@ Write data to file
WriteBVariable(findex,'hello')
WriteBVariable(findex,comma)

WriteBVariable(findex,'how are you')
WriteBVariable(findex,comma)

WriteBVariable(findex,'today')

@ Close file
CloseBFile(findex)
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

sparkythex

  • Newbie
  • *
  • Posts: 43
getting my data saved. -EXCEL OR otherwise
« Reply #2 on: December 30, 2010, 05:20:58 PM »
I can't seem to get this save thing done right.
I’m not sure if my logic is correct even.
I may need a few hidden fields to use as temp storage for my logic to even work.
Please check if I am thinking correctly, by examining my interface, I have a screen shot of my app of what user can input. (I.e. nothing hidden.)
    app_screenshot.jpg
Here is what I am trying to do....
I am trying to make a comic book content generator.   So it is set up that each page is separate & you can toggle through pages.
Here is my working example of what output should be finished.
     http://irongun.50webs.com/
I would like to make it easier to update the content (code) & because it is for online, thus my need to update & store the file locally. (Sort of like update & back up too; double-purpose-score!  8-)  hooray )

I guess what I need is a database structure.
It sounds like the closest I can get to a D.B. with H.N. is coma delimited file style, correct?
I really don't care how the internals of the file look. (Or even if it has to be done in 2-3 files.)
 This is sort of what I was after in terms of concept of how it will need to be structured. (See attached screen shot.  content_sample.jpg;  which was in excel.)
-----
Now....
My logic at 1st was to just have it all entered separately then smash it together bit by bit & just save the total.  Likewise open the total to smash more stuff on later if need be.
But then I thought it may be better to all for entries to be more like a D.B. so if need be user can go back & make changes.
Or so that when adding more it can just stick at end of old file.
What I would like to do is have it so that what is read from the file looks like what is in screen shot of content_sample.tiff (See attached screen shot.  content_sample.jpg;  which was in excel.)
This allows you can look at past entries & then maybe put in a new entry in the middle (which would re-adjust the count # of entries below it. example:  if I wanted to insert between 1 & 2, Then old #2 would become new #3 & so on till end of # reached.)

this example doesn't seem to follow that logic style.
Code: [Select]
Reading example for a file located in the Data Text folder.

@ Read file into field 1

Local fend,fname,h1,sdata
Put 'testdata' into fname
OpenTRead(fname,h1)
Put EndTFileFN(h1) into fend
While fend=0
    ReadTLine(h1,sdata)
    Put sdata After field 1
    Put EndTFileFN(h1) into fend
EndWhile
CloseTRead(h1)
@@@@@@@@@@@@@@@@@@
Reading example for a file located in the Data Text folder.

@ Write 10 numbers to a file

Local n,fname,h1

Put 'testdata' into fname
OpenTWrite(fname,h1)
For n=1 to 10
    WriteTLine(h1,n)
EndFor
CloseTWrite(h1)

this doesn't seem to show how to open & not even sure if it works for what I want. (or rather what i need.)

Quote from: "Malkom"
code

Code: [Select]
@ Write to a named file
Local fname,fvar,fdets,ftypes,fpaths,fnames,fextens
Local findex,n
Local comma,char

@ delimiter
Put ',' into comma

@ File name
Put 'test1.csv' into fname

@ Create and open file
FileGet(fname,fvar,fdets,ftypes,fpaths,fnames,fextens)
CreateBFile(fvar,findex,n)

@ Write data to file
WriteBVariable(findex,'hello')
WriteBVariable(findex,comma)

WriteBVariable(findex,'how are you')
WriteBVariable(findex,comma)

WriteBVariable(findex,'today')

@ Close file
CloseBFile(findex)

 :?:  :?:  :?:  SO CONFUSED!!!  :?:  :?:  :?:
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »