Dynamicall​y Changing Table to File - Advice?

My current setup for logging data selected by the user has been to a simple csv file with each read going to a new line.
This has proved to be very annoying as the user must then reformat this file to their liking.  An example would be that the user requested a voltage and current at the same time and would like them to be in separate columns on the same row.
Example:
Before
Time,Measurement,Value
0:10:00,Voltage Measure,5.1
0:10:00,Current Measure,.12
0:20:00,Voltage Measure,4.2
0:20:00,Current Measure,.23
After
Time,Voltage Measure,Current Measure
0:10:00,5.1,.12
0:20:00,4.2,.23
and so on...
So I have decided to allow the user to assign Measurements to a certain "column" in a table.  And for every measurment at that time (1 second intervals), it gets put into the apropriate column.  Then if a measurement comes at a different time, go to the next row and keep going.
My issue is if there is an efficient way to go from a table to file??  I know there is ArrayToFile but didn't see any TableToArray or TableToFile (csv type) (may add that as a request).
Code replies are appreciated since I would want this to be as efficient as possible.
Dependent on people's replies would indicate how often I should flush to the output.  
Thanks

Never tested it against efficiency, but the easiest way of passing data table to a file is using the clipboard: the following code reads an entire table into the clipboard and creates a file with table content; columns are tab-separated, rows are ended with usual CRLF termination, empty cells are honoured; the file can be read next with notepad.
    int        avail, fH = 0;
    char    *txt = NULL;
        ClipboardPutTableVals (panel, control, VAL_TABLE_ENTIRE_RANGE);
        ClipboardGetText (&txt, &avail);
        if (avail) {
            fH = OpenFile ("table.txt", VAL_WRITE_ONLY, VAL_TRUNCATE, VAL_ASCII);
            WriteFile (fH, txt, strlen (txt));
            CloseFile (fH);
        if (txt) free (txt);
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • Can we change the default file format 'BIN' of system to 'ASC' using table

    can we change the default file format u2018BINu2019 of system to u2018ASCu2019 using table TSOPE
    if possible:will it affect any system performance

    Hello Vincent,
    BIN(Binary) is default selection.and so we have to select ascii.to make myself more clear my queries is like:
    first for setting ascii what we need to enter in text box that is against ASCII.and
    secondly if we select ASCII will it affect system performance in anyways.

  • Open Hub Destination Table Vs File

    Hello Experts,
    We have a requirement to send data from BW to 3rd party system every day. In the Open hub destination we have two options for the target.
    1. Table
    2. File
    ETL tool like Informatica will extract the data from table or file into 3rd party sytem.
    Which way is the best in performance and maintenance?
    Thanks in advance
    Sree

    Hi,
    If you follow the delta mechanism then table is good. You can also go for File not a problem. See the both eamples in the following articles.
    If you use Fiels then go for Application Server option, i.e. AL11 becasue no one can change teh files in this location, you can restrict the authorizations.
    Open Hub Destination: Part 1
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/m-o/open%20hub%20destination%3a%20part%201.pdf
    Open Hub Destination: Part 2
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/m-o/open%20hub%20destination%3a%20part%202.pdf
    Thanks
    Reddy

  • Is it possible to change a jpg file back to an ai file?

    Before I begin I am a complete novice. Never used a mac before, never used illustrator before.
    My sister made some wedding invitations for me on illustrator which I ordered last week. They have arrived but unfortunately there is an error on both the front and inside. She has since gone travelling, so is unable to rectify this.
    I have her mac and have managed to change the front cover however there is no ai file for the interior image, only a jpg. I have spoke to her, and we have spent a long time trying to track down the ai file but it's completely disappeared, no idea what's happened and she cannot think of any reason why it would have been deleted.
    Is it possible to change a jpg file back to an ai file so I can edit the text? It is a very simple edit (mistake is RSPV instead of RSVP ). She mentioned trying to just put a box over the text but there is an image in the background so I don't think this is possible for a novice like me.
    Can anybody (in very simple terms) give me any advice? I am starting to panic (sister isn't back for 18 months, wedding in just over 2 months!).
    Thanks

    madbelle wrote:
    It is a very simple edit (mistake is RSPV instead of RSVP ). She mentioned trying to just put a box over the text but there is an image in the background
    In that case automatic vectorization won't get you anywhere.
    Use Photoshop and move the two letters around. You might be lucky and noone notices.
    Can you show a screenshot?

  • How to run insert/update/delete from CDC Change table to target using OWB

    I am planning to set up CDC and publish CDC change table as source data into to OWB. I have come across where I am confused how to apply changes from CDC change table to target database using OWB. For i.e. change tables is containing information like
    operation$, cscn$,commit_timestamp$,xidusn$,....,list of column name
    D,12323223,8/28/2008 1:44:32PM,24,.....,list of column value that have to be deleted from target
    UO,12323224,8/28/2008 1:45:23PM,24,.....,list of column value that have to be updated in target.
    Please advice or give me some hint. Thank you.

    Hi,
    you can wait for 11gR2 with CDC integration or build most of the code outside the owb. To use CDC you must do this things (http://www.oracle.com/technology/oramag/oracle/03-nov/o63tech_bi.html):
    1. Identify the source tables.
    2. Set up a publisher.
    3. Create change tables.
    4. Set up a subscriber.
    5. Subscribe to the source tables, and activate the subscription.
    6. Set up the CDC window.
    7. Prepare a subscriber view.
    8. Access data from the change tables.
    9. Drop the subscriber view, and purge the CDC window.
    10. Repeat steps 6 through 9 to see new data.
    You can do only a few of this inside owb, most of it must be done outside.
    Regards,
    Detlef

  • Change tables order

    Hi
    I'm trying to do a java application, using unmanaged ras, which change tables order.
    I tried 2 methods but the two of them seems to have a bug.
    In the first one I tried to move one table to the end and when i displayed the tabels looked just fine but when I save the report the changes are lost.
    In the second I saved the table in a temporary table I removed it (after i erase manually the field from the report just to see if this method works) and then I add the saved table.This method do what I want except the fact that the newtable that I add had other connection info even if i put it the connection info from the erased table.And now is like I select the data from 2 different datasources and I don't want that.I use odbc connection and the old table has
    Database DLL : crdb_odbc.dll and the new one has Database DLL:crdb_query.dll and this is not the only difference.
    Here I paste part of my code to clarify the things:
      public static void main( String[] args )
              init();     //this method initialize the ras server I don't paste
                            //the code because this works just fine and I think is
                            //not rellevant for my problems
              try{
                   ReportClientDocument reportClientDocument1 = new ReportClientDocument(  );
                   reportClientDocument1.setReportAppServer( reportAppSession.getReportAppServer(  ) );
                   reportClientDocument1.open("rassdk://C:/tmp/bbb.rpt",0);     
                  changetables(reportClientDocument1,alias );
                   reportClientDocument1.saveAs("bbb1.rpt", "rassdk://C:/tmp",1);
                   reportClientDocument1.close();
                   System.out.println("doc bbb1 saved");
            catch(ReportSDKException ex1){
                   ex1.printStackTrace();
              catch(IOException ex2){
                   ex2.printStackTrace();
              try{
                   ReportClientDocument reportClientDocument1 = new ReportClientDocument(  );
                   reportClientDocument1.setReportAppServer( reportAppSession.getReportAppServer(  ) );
                   reportClientDocument1.open("rassdk://C:/tmp/bbb.rpt",0);     
                  removeaddtable(reportClientDocument1,alias );
                   reportClientDocument1.saveAs("bb2.rpt", "rassdk://C:/tmp",1);
                   reportClientDocument1.close();
                   System.out.println("doc bbb2 saved");
            catch(ReportSDKException ex1){
                   ex1.printStackTrace();
              catch(IOException ex2){
                   ex2.printStackTrace();
    public static void changetables(ReportClientDocument rpt,String alias)
         int poz;
         try{
         poz=rpt.getDatabaseController().getDatabase().getTables().findByAlias(alias);
         if (poz!=-1){
              ITable auxtable=rpt.getDatabaseController().getDatabase().getTables().getTable(poz);
              rpt.getDatabaseController().getDatabase().getTables().remove(poz);
              rpt.getDatabaseController().getDatabase().getTables().add(auxtable);
              System.out.println("change table method complete");
         }catch(ReportSDKException e){
              e.printStackTrace();
    public static void removeaddtable(ReportClientDocument rpt,String alias)
         int poz;
         try{
         rpt.getDatabaseController().logon("snr","snr");
         poz=rpt.getDatabaseController().getDatabase().getTables().findByAlias(alias);
        if (poz != -1)
             IConnectionInfo ci=rpt.getDatabaseController().getDatabase().getTables().getTable(poz).getConnectionInfo();
             Table newTable=(Table)((Table)rpt.getDatabaseController().getDatabase().getTables().getTable(poz)).clone(true);
             rpt.getDatabaseController().removeTable(alias);
             TableLinks tl=rpt.getDatabase().getTableLinks();
             newTable.setConnectionInfo(ci);
             rpt.getDatabaseController().addTable(newTable, tl);
             System.out.println("removeaddtable method complete");
         }catch(ReportSDKException ex1){
                   ex1.printStackTrace();
    I hope you can tell me how should I modify the method changetables or
    removeaddtable to obtain what I want.

    Hi Jason,
    How to change the order of tables within sheets
    Make a table active by clicking in it once to select that table, then drag it by the 'bullseye' (top left, I have placed a red circle to show the bullseye):
    After dragging the table down:
    Table 1 is now below Table 2.
    The blue line is an Alignment Guide
    Two types of Guide:
    1. Menu > View >Show Rulers. Drag Alignment Guides from a ruler to where you want them.
    2. Menu > Numbers > Preferences > Rulers > Alignment Guides. Turn on (tick) both guides. That allows you to align objects with *each other* (as well as with the ruler guides). These guides help to align objects left, middle, right, top, bottom.
    Alignment Guides do not show unless you are moving an object.
    to drag/move table to another sheet in the one file
    Not possible in Numbers 3. The Sheets Pane has gone. Instead, select the entire table (click once in the table to make it active, then click on the bullseye). Copy (or Cut if you are brave). Go to another Sheet and Paste.
    Also can you change the size of sheet tab width on tab toolbar, so I can see more sheets at once??
    No. Let's hope this will be added in future updates. However, you can drag a Sheet tab left or right to reorder them.
    Another tip: each Sheet tab shows the contents of that Sheet, with some options such as Duplicate and Delete:
    Regards,
    Ian.

  • User Roles for changing tables?

    Which user roles are there in the environment for changing tables?
    Any help is appreciated.
    Regards,
    Neetu

    Search for roles which have SE11 in their menu as a tcode and take you best pick or create your own.
    The advice from the other is also good in my opinion (he who changes table fields should also change the program.... )....
    Cheers,
    Julius

  • Can we change table into XML through OWB

    Hi everyone,
    Is it possible to change table into XML through OWB?
    Can anybody help me.
    just send me the steps to do
    Thanks in advance
    Rachit

    Hello, Rachit
    As far as I understand our question – you need to export data from the table into XML file.
    I don’t think you have direct operator within OWB (at least for ver. 9.2.0.4). But anyway, you could write PLSQL procedure using DBMS_XMLQUERY to perform XML generation and transform it with your stylesheet.
    Unfortunately, this package uses DOM to work with XML, so could have a serious memory consumption while trying to export large tables this way.

  • What is, "Portrait Displays" displayed: "version changed bad license file".

    Monitor: w2207h. Nvidia GeForce 8300GS 128MB graphics card. a6437c #KJ400AA-ABA. Vista Home Prem 64 bit. [email protected] 4GB memory. New July 4, 2008. Sam's Club.
    Uninstalled "My Display" (display driver), per advice this forum in '08 or '09.
    Guessing this driver enables landscape/portrait display swith when monitor rotated. Don't know what else.
    Thanks in advance
    Dean2011
    [email protected]

    Hi,
    Go to NVIDIA and download and install the latest NVIDIA video driver.
    Go into the Control Panel  ---> NVIDIA Control Panel and locate the rotate display function.
    If the above solves your issue except for the message issue then I would delete out the Pivot software.
    The "version changed bad license file" message sounds like this issue. 
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • Changing msi cnf. file freezes my pc

    hi all--new here obviously---im a regular at toms but no one could help me----i have tried many times to change the cnf. file in afterburner so i can oc past the ccc limits--but everytime i do it --- the second i go to 776  (775 is ccc max of course0 my computer freezes ????? does anyone have any idea why---if more info is needed feel free to ask---im running the crosshair IV mobo--1090t phenom II @ 3.84 ---ddr3 kingston hyper x 1600 @ 1762---noctua nd-h14 cooler--xfired visiontek 5850's--ultra x4 750 psu -- haf 932 case --- 28 " asus monitor---i need help--i know these cards can do alot more and im scared to try and flash the bios---no money for replacements---lol--thank you in advance

    hi all---new here obviously--im a regular at toms but no one could help me---i posted this in the general forums too by accident----anyway---everytime i change the cnf. file from zero to one and save it--the second i go to 776 (775 is ccc max of course) my rig freezes---can anyone offer any advice--
    my rig :
    crosshair formula IV mobo
    phenom II 1090t @ 3.84ghz
    noctua nh-d14 cooler
    kingston hyperx ddr3 1600 @ 1762 at 1.6v
    xfired visiontek 5850's @ 775/1125--ccc max--grrrrrrrrr
    ultra x4 750w psu
    28" asus monitor
    haf 932 case

  • Nable to change permission of file system node / WAS 6.2

    During WAS 6.2 Installation (Step: Create SAP Program Icons - post processing) I receive the following message:
    FSL-02007  Unable to set access rights of E:/usr. SetNamedSecurityInfo: Diese Sicherheitskennung kann nicht als Besitzer des Objekts zugeordnet werden.
    ERROR 2004-10-21 13:25:20
    MOS-01085  Unable to change permission of file system node E:\usr\sap/.. with type DIRECTORY to (dg\SAP_LocalAdmin,GROUP,=rwx) (SYSTEM,GROUP,=rwx) (Administrators,GROUP,=orwx).
    ERROR 2004-10-21 13:25:20
    MOS-01105  Processing of one or more file system node operations of table   Content of table: t_SAPComponent_Permission_Action_SHARED  Row[0]    WapsSystemName="S01" WapsInstanceName="DVEBMGS10" WapsInstanceHost="dg" Key="WAPS_FilePermission_100" Condition="true" OpMode="SETPERMISSION" NodeName="E:\usr\sap/.." NodeType="DIRECTORY" NodePermission="(dg\SAP_LocalAdmin,GROUP,=rwx) (SYSTEM,GROUP,=rwx) (Administrators,GROUP,=orwx)" Recursive="YES"   Row[1]    WapsSystemName="S01" WapsInstanceName="DVEBMGS10" WapsInstanceHost="dg" Key="WAPS_FilePermission_101" Condition="true" OpMode="SETPERMISSION" NodeName="E:\usr\sap" NodeType="DIRECTORY" NodePermission="(dg\SAP_LocalAdmin,GROUP,=rwx) (SYSTEM,GROUP,=rwx) (Administrators,GROUP,=orwx)" Recursive="YES"   Row[2]    WapsSystemName="S01" WapsInstanceName="DVEBMGS10" WapsInstanceHost="dg" Key="WAPS_FilePermission_102" Condition="true" OpMode="SETPERMISSION" NodeName="E:\usr\sap/S01" NodeType="NODE" NodePermission="(dg\SAP_S01_LocalAdmin,GROUP,=rwx) (SYSTEM,GROUP,=rwx) (Administrators,GROUP,=orwx)" Recursive="YES"  failed.
    ERROR 2004-10-21 13:25:20
    FJS-00012  Error when executing script.
    Environment:
    W2K, Local Installation
    Dieter

    Das Dateisystem muß auf NTFS konvertiert werden. Dann klappts.

  • When I try to upload a file it goes through the correct proceedure, but does not change the remote file i.e.Index.htm

    Hi
    I have an uploading problem to the server. The problem is when I try to upload a file it goes through the correct proceedure,
    but does not change the remote file i.e.Index.htm, or three stages1.htm.
    My Localroot folder is C:\Gods Plan Web\
    The site map layout is C:\Gods Plan Web\Index.htm
    The folder for the remote site is /public_html/
    Should the local root folder mirror the remote site, i.e./public_html/
    if this is so, what should I put into the
    (a) Local Root Folder box?
    (b) site map layout box?
    The FTP is performing well other than changing the intended file.

    You should be uploading only the contents of your local root to the public_html folder (remote root).
    The index.html you use as your site's home page needs to be in your site root. If you look at your Files window in DW, you should have something like the following...
    Site - Whatever you named your site
         index.html
         images
         pages
              page1.html
              page2.html
    If you have any folder between Site - and the index.html page, like...
    Site - Whatever you named your site
         mywebsite
              index.html
    It will upload to the public_html while still in that folder, so to find your page online, you would need to type something like...
    www.mydomain.com/mywebsite
    public_html should NOT appear within your local files and if it existed there, would cause a redundancy if uploaded. You would need to type www.yourdomain.com/public_html to see the uploaded pages.
    If you could post a screen shot of your expanded Files window while connected to the server (just connect and click the Expand button in Files, don't drill down into any of the directories), we may be able to see the issue.

  • How can I change the source file so it is direct from external hard drive?

    I am trying to make a movie on imovie of a snowboarding trip that I went on, there is around 80 to 100 gig of mp4 movies that will not fit on my computer that I have stored on my external harddrive. I had the movie half finished then found I could do no more as I had no space left in my mac. I had to delete everything and start again but I'm not doing this until I can find a way of changing the source file so I can take them direct from my external hard drive as to not use up all my computers available space. I have moved imovie to my external hard drive but it still tries to read from a movie file on my mac, how can I change that so it will read from a source file on my external hard drive, is it possible?? Can someone help me??

    Hi Bengt, Thanks for your input, much appreciated.
    I have a WD 1TIG hard drive and are using usb connection, is it possible to use fire wire with these? I have had trouble with a lot of the videos I Imported, once they downloaded the file in the viewer window showed up blank and when I mouse over them it places a picture of another file in the window and wont drag and drop into the movie window, like their corrupted or something? Had to delete just about all of them and start again. Also is it possible to select a bunch of videos in the viewer window as to change the dates to the correct dates? All I have been able to do is "select all" which is no help.

  • I would like to burn dvds..does anyone know a good safe easy to use converter/burning download to allow me to change mp4 /avi files to dvd so i can burn them on a disc that will play in all or most dvd players...thank you

    i would like to burn dvds..does anyone know a good safe easy to use converter/burning download to allow me to change mp4 /avi files to dvd so i can burn them on a disc that will play in all or most dvd players..also is it possible to upload store boughten dvds/bluerays to my macbook..if so does anyone know how one would do that ? im just getting used to this mac and i do love it but alas i am comp stupid  hahaha...thank you

    Toast Titanium by Roxio.

  • How can I change a .band file created in GarageBand to an .mp3 file?

    How can I change a .band file created in GarageBand to an .mp3 file?

    Dorsey Hudson wrote:
    My GarageBand didn't work exactly as you suggested.
    my apologies, i dropped the word "then."
    for future readers:
    "use the Share menu, then tick the Compress checkBox..."

Maybe you are looking for

  • HT1694 How do I log off from my Hotmail account on my iPad.

    I don't seem to be able to log out of my hotmail account on my iPad Air. any ideas?

  • White Screen at Startup?

    I've been noticing as of late, that whenever I boot up my iMac, it seems stall and I get a persistent white screen. After a minute or two, the wallpaper comes up along with the icon and the dock. It seems as if the Finder is having some issues loadin

  • Basic Question on SAP NW CE

    Hello, I need CE since I want to use the Services Registry. What is the difference between SAP NW and NW CE from buying perspective? Would I have to buy CE = NW+ some more components OR CE == fewer components than NW. I understand that buying CE woul

  • Is it possible to create this type of 'Rule'....

    Hi, The spammers have got me good this time!! I am getting tens of emails a day asking if I want to buy gold. The problem is that I can't seem to create a rule to filter these out. The subject and sender are always different, and usually garbage. Als

  • Error: Documentation for Install

    In the Configuration chapter, under the Configuration File section, it lists the places to look for the file, with the last being the default for a new install: 6) ${java.io.tmpdir}/APEX/apex-config.xml (default for new installs ) On Unix/Linux it ap