Store Different Data

Creating a macro - Writing a Script - Using the API

Store Different Data

Postby npandit » Tue Nov 19, 2019 8:47 am

Am using this line to store a value in a cell:
'ocell = oSheet.getCellrangeByname("E1").SetString(txtFlowrateCase1.Text) 'set string
but i have 5 records t and am printing all the records together
It only prints the record which is displayed.(data which is currrently displayed in the textbox)What about the record which i have already stored from the same textbox?
How do i Print them all together?
The data is Different in each record accepted by the same textbox
Open Office 4.1.7
npandit
 
Posts: 13
Joined: Mon Nov 11, 2019 10:09 am

Re: Store Different Data

Postby FJCC » Tue Nov 19, 2019 5:02 pm

Do you want to store the five values in E1 or do you want them to be in five separate cells?
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7385
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Store Different Data

Postby floris v » Tue Nov 19, 2019 5:35 pm

That doesn't make sense. You are talking about printing and storing as if it's the same thing. I suppose that you want to store the data in Record 1, currently displayed in a text box, in cell E1, the data in Record 2 in cell E2, etc. If so, you have to navigate through your database table, fetching one record at a time, then grabbing the data. Repeat until end of table.
AOO 4.1.6 op Linux Mint
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
floris v
Moderator
 
Posts: 4177
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 7 guests