Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


make a csv file and more coloms


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-11-2007, 08:27 PM
Junior Member
 
Join Date: Dec 2007
Posts: 32
Default make a csv file and more coloms

I am able to write a file. For this example I write the value porder and soortreg to the oee.csv file. How do I make a 'real' csv file and more important how do I make coloms:

i now have a file what looks like:
porder
soortreg
porder2
soortreg2

I want to have the file looks like:
porder,soortreg
porder2,soortreg2

___
sub btnoeereg_Click
' ErrorLabel(errSaveINI)
FileOpen( c1,"oee.csv",cwrite,cAppend)
FileWrite(c1,porder.Text)
FileWrite(c1,soortreg.Text)
FileClose(c1)
Return'If there were no "Return" here, the error message would have shown.
errSaveINI:
Msgbox("Error writing INI file.","",cMsgboxOK,cMsgboxHand)
FileClose(c1)
End Sub
Reply With Quote
  #2 (permalink)  
Old 12-11-2007, 08:41 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 672
Default

Hi sunnyboyj,

you should use a table to save your data.
I added an example of creating a small table and saving it to csv (one time with and on time without a header).
If you want to use a table as an "internal storage", you can set the visible property to false.


specci48
Attached Files
File Type: sbp SaveCsv.sbp (949 Bytes, 20 views)
Reply With Quote
  #3 (permalink)  
Old 12-11-2007, 08:44 PM
Junior Member
 
Join Date: Dec 2007
Posts: 32
Default

Thanks, you are fast!
I will try it with your suggestions
Reply With Quote
  #4 (permalink)  
Old 12-11-2007, 09:19 PM
Junior Member
 
Join Date: Dec 2007
Posts: 32
Default

I understand the addcol and addrow now, thanxs! But how do I save the information from button artnr, porder and soortreg into the file (I thought it would work like this, but it does not). Also I want to 'append' the file when generating more info by pressing the OK button.

Table1.AddCol(cString, "Artnr", 50)
Table1.AddCol(cString, "Porder", 50)
Table1.AddCol(cString, "Soortreg", 50)
Table1.AddRow(artnr,porder,soortreg)
Table1.SaveCSV("WithoutHeader.csv", ",", False)
Reply With Quote
  #5 (permalink)  
Old 12-12-2007, 02:27 AM
Senior Member
 
Join Date: May 2007
Posts: 132
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Add quote marks for string cells...
Table1.AddRow("artnr","porder","soortreg").
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote
  #6 (permalink)  
Old 12-12-2007, 09:07 PM
Junior Member
 
Join Date: Dec 2007
Posts: 32
Default

Thanks for your response!
I have checked it and worked out that I have to use:
Table1.AddRow(porder.text,soortreg.text etc.etc....)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the PDA type and make HARRY Questions & Help Needed 3 01-13-2008 12:19 PM
How do I make a textbox go from one to the other sunnyboyj Questions & Help Needed 2 12-17-2007 09:44 PM
Is it impossible to make app without form? conf Questions & Help Needed 7 06-25-2007 03:56 AM
Help me to make HTMLViewer Lib conf Questions & Help Needed 2 06-17-2007 05:35 PM
Make table to edit giannimaione Basic4ppc Wishlist 0 05-13-2007 11:10 AM


All times are GMT. The time now is 02:01 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0