How concatenate date and array to write in excel?
Hello
I have a problem to concatenate a date array and numeric array. can you help me?
I want save Measurement of a sensor with save time in an excel (row 1 column1 save date and row 1 coulmn : save sensor data). but I cant save these two value seperatly(my clocks cant do it). now, I want concatenate them at first and then save them. is it possible?
Best Regards
Solved!
Go to Solution.
Attachments:
concatenate.jpg 82 KB
Try the attached. You'll understand it as soon as you see it. If not, shout.
Attachments:
write_to_file.vi 8 KB
Similar Messages
-
How to concatenate date and time after a logical file in application server
Hi Experts ,
I have a requirement that goes like this : I have a job that runs parallelly with 10 different variants at the same time. Each job will write the data into a file in the application server, since the jobs run parallelly there is a chance of the file being over-written and hence we have decided to concatenate time and date at the end of the file so that the file does not get over-written. Can someone please let me know how to incorporate this change.
Thanks & Regards,
Balaji.KHi Balaji.
Use CONCATENATE functionality.
A sample code snippet for your reference :-
CONCATENATE p_path text-202 c_9 p_name c_9 lv_fcount c_9 lv_date
c_9 lv_time INTO gv_file.
Regards
Abhii -
How to group data and assign cell names using Excel templates
Hi all,
reading the article "Real Excel Templates 1.5" on the Tim Dexter's Blog, I found that I need hierarchical data for Excel templates. So only in this way I can group my data.
My hierarchy is composed by 3 levels:
lev 1 DESTINATION: is the higher level that groups SERVICES and COUNTRY
lev 2 SERVICES: is the level that groups the countries
lev 3 COUNTRY: is the lowest level with the COUNTRY, CALLS and CALLS_MINUTES details
An example of my hierarchy is this:
lev 1 INTERNATIONAL
lev 2 INTERNATIONAL FIXED
lev 3 Albania 90 438,15
lev 3 Armenia 1 16,95
lev 2 INTERNATIONAL MOBILE
lev 3 Albania Mobile 161 603,35
lev 3 Australia Mobile 6 34,38
lev 1 NATIONAL
lev 2 HELLAS LOCAL
lev 3 Hellas Local 186,369 707940,6
lev 2 HELLAS MOBILE
lev 3 Hellas Mobile Cosmote 31,33 43856,97
lev 3 Hellas Mobile Q-Telecom 2,398 4343,78
lev 2 HELLAS NATIONAL
lev 3 Hellas Long Distance 649 1499,55
lev 1 INTERNET
lev 2 INTERNET CALLS
lev 3 Cosmoline @Free 79 2871,3
So, my data template is the following (with exactly the hierarchy I want for my data):
<dataTemplate name="emp" description="destinations" dataSourceRef="GINO_DB">
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[SELECT 1 TOTAL_CALLS, 2 TOTAL_CALLS_MIN from dual ]]>
</sqlStatement>
<sqlStatement name="Q2">
<![CDATA[SELECT dest.ID_DESTINATION, dest.DESC_DEST from ale.AAA_DESTINATION dest order by dest.ID_DESTINATION ]]>
</sqlStatement>
<sqlStatement name="Q3">
<![CDATA[SELECT ser.ID_SERVICE,
ser.ID_DEST,
ser.DESC_SERVICE,
count.ID_COUNTRY,
count.ID_SERV,
count.COUNTRY,
count.CALLS,
count.CALLS_MIN
from ale.AAA_SERVICE ser, ale.AAA_COUNTRY count
where ser.ID_SERVICE= count.ID_SERV
and ID_DEST = :ID_DESTINATION
order by ser.ID_SERVICE ]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_TOT" source="Q1">
<element name="TOTAL_CALLS" value="G_COUNTRY.CALLS" function="SUM()"/>
<element name="TOTAL_CALLS_MIN" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
<group name="G_DEST" source="Q2">
<element name="DESC_DEST" value="DESC_DEST"/>
<element name="DEST_CALLS_SUBTOTAL" value="G_COUNTRY.CALLS" function="SUM()"/>
<element name="DEST_CALLS_MIN_SUBTOTAL" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
<group name="G_SERV" source="Q3">
<element name="DESC_SERVICE" value="DESC_SERVICE"/>
<element name="SERV_CALLS_SUBTOTAL" value="G_COUNTRY.CALLS" function="SUM()"/>
<element name="SERV_CALLS_MIN_SUBTOTAL" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
<group name="G_COUNTRY" source="Q3">
<element name="COUNTRY" value="COUNTRY"/>
<element name="CALLS" value="CALLS"/>
<element name="CALLS_MIN" value="CALLS_MIN"/>
</group>
</group>
</group>
</group>
</dataStructure>
</dataTemplate>
Not considering the CALLS and CALLS_MIN details (I focused only on the COUNTRY which is as the same level), with this data template, making tests on my excel template, I noticed that I can group ONLY two nested levels using the format XDO_GROUP_?group_name?
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_SERV?
or
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_COUNTRY?
or
XDO_GROUP_?G_SERV?
XDO_GROUP_?G_COUNTRY
If I try to group all the three level together in this order
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_SERV?
XDO_GROUP_?G_COUNTRY
I don't have the output I would like to have.....
Practically, in my excel I have 3 rows with the following labels
DESTINATION (called XDO_?DESC_DEST? - =Sheet1!$A$3
SERVICE (called XDO_?DESC_SERVICE? - =Sheet1!$A$4
COUNTRY (called XDO_?COUNTRY? - =Sheet1!$A$5)
where
XDO_GROUP_?G_DEST? (=Sheet1!$A$3:$B$5)
XDO_GROUP_?G_SERV? (=Sheet1!$A$4:$B$5)
XDO_GROUP_?G_COUNTRY (=Sheet1!$A$5:$B$5)
I noticed that if I don't use the last one (XDO_GROUP_?G_COUNTRY), my output is correct even if I don't have more than one country for each service....As soon as I put XDO_GROUP_?G_COUNTRY....I loose all the 2nd level and the most of times the 3rd level too....
So...I think that the problem is how I choose the excel cells when I assign the XDO_GROUP_?group_name?
Anybody had made some tests, or can help me ???? I'm becoming crazy.....
Any help will be appreciated
Thanks in advance
AlexBut how can I use tags XDO_GROUP_?? to group data correctly using hierarchial xml, I don't want to use flat XML.
Yep, I using Template Builder in Excel to run reports localy, and output is wrong
It's seems that groups couldn't define the level of nesting, I think...
How can I write it in XDO_METADATA sheet?
Though I have hierarchial XML and groups should define nesting level correctly.
I have no clue..... -
CONCATENATE date and time into a text variable
Hi ABAP Gurus,
I would like to retrieve current system date and time and concatenate into a variable. I would really appreciate if someone could help me. I have the following code and i seem to get some kind of error.
I would like my output to be like:
"22.JUN.2006 Some Text 12:30:22"
Code:
data: emtext like TEMSG-EMTEXT.
data: date_output(50) TYPE C.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = date_output.
SHIFT date_output RIGHT DELETING TRAILING SPACE.
CONCATENATE date_output ': Some Custom Message '
INTO emtext.
Also, is there a function to convert time to text or conversion is not necessary?
Thanks.
Regards,
bw_newbieHere is something a little closer to your requirement.
report zrich_0001 .
data: date(20) type c,
time(10) type c,
str type string.
data: xT247 type T247.
select Single * into xt247 from t247
where MNR = sy-datum+4(2).
concatenate sy-datum+6(2) xt247-ktx sy-datum(4)
INTO date separated by '.'.
write sy-uzeit to time.
concatenate date 'SomeText' time into str separated by space.
write:/ str.
Regards,
Rich Heilman -
Insert date and time into write to spreadsheet
Easy question here
I need save 4 arrays of data and insert the date and time that it was taken (LV 8.6)
for example
9/4/09 10:00:01 AM 4 6 7 2
9/4/09 10:00:02 AM 4 6 7 2
9/4/09 10:00:03 AM 4 6 7 2
9/4/09 10:00:04 AM 4 6 7 2
Any ideas, I can't wire the timestamp or date/time string right into the create array
Thanks
Chris
Solved!
Go to Solution.Ok
the basic problem that I see is the the LabVIEW TimeStamp type is a cluster. Converting it to a dbl gives you a value in seconds elapsed since 1904 Jan 1 12:00AM GMT and, your spreadsheet cannot interprate that (or display that) as a "TIME." So, you want to convert it to a string (easy TS->String check the help for format options) BUT, you might want to pass all of your data as numbers into your spreadsheet so you can post-calculate or graph other outputs vs. TIME! This little chunk of code .....
converts a LV Timestamp to a number that Excel interperates as "the amount of days elapsed since 0 Jan 1900 @ 12:00AM LOCAL." You will need to format the cell in Excel to display it as a date-time But it can be operated on and graphed against with only Excel's limitations (Excel followed the Lotus bug of erroneously assuming 1900 was a leap year, and Leap seconds are unrecognized)
Enjoy!
Message Edited by Jeff Bohrer on 08-06-2009 02:28 PM
Jeff -
How to use ActiveX to open/write to Excel template but not to overwrite it
Hi there again (it's me...if anyone recognised me...)
I managed to use ActiveX to open Excel and make it visible onto the screen. But I would like to know how can I make Excel open an Excel template and let me write data to the cells without overwriting the original template. I did try to use another program source such as the EXCEL TOOLKIT but I can't still figure out how does it work for my case. Is there a simpler example for me to refer too? Please help.
Thank you,
juniHi Mike..
I have tried to use the examples provided LabView 6.0. I don't understand how to use the Range value to get the data from my global array and also how to open the template and write data to it.
At the moment, I could only open a saved dialog box and a default string filename is used to save my data into a new Excel but not the formatted excel which I want.
If possible, please help again. Vi attached.
Attachments:
savefile.vi 109 KB
datarecords.vi 12 KB -
How to find out How many rows and coloumn exists in the Excel sheet
hai gurus,
present iam uploading data from presentation server to application server. when i use gui_upload the data is coming non-readable format.
so i used alsm_excel_to_int fm for that . but the problem is user can give any type of excel so... i need to know how many rows and coloumn s existed in that Excel
so is there any possiblity to get those values(Total rows and total coloumns).
plz help me..
if any one answered , appreciate with reward points,
thanks®ards,
Venu.Tsee you have to come into an agreement with other system before starting development..
Please dont do unnecessary coding for impractical things ..you may solve this but this is not good way of working in eRP packages..
Al least u can get final list of all Columns and which can be blank or non blank like this
then u can do coding for this scenerio
regards...
Message was edited by:
Madan Gopal Sharma -
How to find and replace certain text in Excel.
I am new to Automator. And I would like some help how I can create a service that will allow me to find and replace certain text in Excel. I noticed that there is an action to do this for Word documents, but not for Excel documents.
Any suggestions how I can do this?
Thanks so much for your help.Marga,
I think the best place to ask about Office for Mac would be in the MS forums.
Jerry -
How to Search and Array for multiple occurrences of a value
Hi,
I am trying to search an array of doubles for a number and report the index location(s) of a number. I.e. -allow for repetition. Search and report all index[i] where the number is contained in the array. For example I have
double[] myInputArray = new double[5];
double[] myInputArray = { 1, 2, 3, 3, 5 }I know how to search through the array ONCE and return the first occurrence of a number:
public double GetIndexOf(double Number) {
for (int i=0; i<myInputArray.length; i++) {
if (myInputArray[i] == Number){
return(i);
return(-1);
}How do I expand this code to report multiple index[i] locations if the number reoccurs in the array like the number 3 does in my example array above?The way the Java libraries do this type of operation (String.indexOf(), etc) is to specify the starting index along with what you want to find.
Changing your example slightly (notice how I fixed your naming and more importantly, your return type):
public int indexOf(double num) {
return indexOf(num, 0);
public int indexOf(double num, int fromIndex) {
for (int i=fromIndex; i<myInputArray.length; i++) {
if (myInputArray[i] == num){
return(i);
return(-1);
//usage to get all indices:
for ( int index = -1; (index = indexOf(num, index+1)) != -1; ) {
System.out.println(index);
}Note that due to how floating point numbers work, you may find doing this on doubles (or any other operation that uses == with double arguments) to give you unexpected results. -
How to search and replace a string in Excel Shape (textbox) using Powershell.
I have been asked to write a PS script to search/replace a string when found in Excel Shapes when they are textboxes. I have seen lots of simplistic PS scripts and even I can do a "foreach" loop through all the Shapes on a Sheet and display the
Name of each Shape. But I have not found a property or method to expose the actual text in a textbox let alone change it.
I have seen vba script that does this as:
Set xWs = Application.ActiveWorkbook.Worksheets(I)
For Each shp In xWs.Shapes
xValue = shp.TextFrame.Characters.Text
shp.TextFrame.Characters.Text = VBA.Replace(xValue, xFindStr, xReplace, 1)
Next
In Powershell, shp.TextFrame.Characters.Text is ignored and returns nothing. It would be nice to know if this is possible in PS and if so, know how to do it and/or get an example to work from. I would have thought that
PS and VB would use the same Excel object model but apparently they do not.
I am using Excel 14.0 and PS 3.
Any suggestions would be appreciated,
MichaelThis didn't work for me. I have the shape object and it shows the textframe property:
PS C:\> $shape | gm
TypeName: System.__ComObject#{00024439-0000-0000-c000-000000000046}
Name MemberType Definition
Apply Method void Apply ()
CanvasCropBottom Method void CanvasCropBottom (float)
SoftEdge Property SoftEdgeFormat SoftEdge () {get}
TextEffect Property TextEffectFormat TextEffect () {get}
TextFrame Property TextFrame TextFrame () {get}
TextFrame2 Property TextFrame2 TextFrame2 () {get}
ThreeD Property ThreeDFormat ThreeD () {get}
But trying to access it gives an error:
PS C:\> $shape.textframe | gm
gm : You must specify an object for the Get-Member cmdlet.
At line:1 char:20
+ $shape.textframe | gm
+ ~~
+ CategoryInfo : CloseError: (:) [Get-Member], InvalidOperationException
+ FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand
PS C:\> $shape.TextFrame.Characters().text="hello"
You cannot call a method on a null-valued expression.
At line:1 char:1
+ $shape.TextFrame.Characters().text="hello"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
I hope this post has helped! -
How to find out How many rows and coloumn exists in the Excel sheet at run
hai gurus,
iam uploading excel to application sever,. when i used gui_upload the data is non-readable. so.. i used alsm_excel_to_int fm .but the problem is user can upload any type of Excel to Application so i need to know the total no of rows and coloum at runtime .is there any possiblity to find out those values.
Plz help me.
if any one answered , rewards points,
Thanks &Regards,
Venu.THi kiran,
i u case better to upload the data first to application server than u can run the bdc program that will helps u
try these T-code for uploading data from prsentation server to application
CG3Y and CG3Z this will helps.
reward is usefull.
thanks.
patil. -
Java input xml data and xsl template -output file excel
i need help or same special link on web.
i must develop code or use a special tool that make this.
INPUT:
xml that contain real data
xsl that explain a report template
OUTPUT:
file excel that show the template xsl with xml data source
thank for help me.Hi,
Please refer to "Oracle XML Publisher User's Guide".
Applications Releases 11i and 12
http://www.oracle.com/technetwork/indexes/documentation/index.html
This is also explained in the document attached in (Publishing Concurrent Requests with XML Publisher [ID 295409.1]).
Thanks,
Hussein -
How to embed and open PDF files within excel
I constantly need to embed PDF files onto Excel documents as well as extract/open/view PDF files from Excel documents. I am unable to do so with a macbook, i know that there is a workaround but it's such a tedious process. Is there a software i can buy or setting that i can do so that i can embed and open PDF files easily as i need to view these files multiple times a day for work.
please adviseDownload and install Adobe Reader: Adobe Reader Install for all versions
Open the PDF file using it. If security restrictions don't prevent it you could also print it. -
How to rename and access worksheet form existing Excel file??
Hi all,
Is there any FM to access particular excel worksheet?? I want to <b>download data</b> <b>into a particular sheet</b> <b>of existing excel file</b>. Is there any FM for that??Re: Download into Excel Sheet
regards
Andreas -
How to save and open Text/csv file over APS
Hi,
I want to save(and open later) data from database block in text/csv file format over Application server, I did a lot of search here on Forms but didn't found a reasonable solution, Some one plz help me.
Thanks and Regards, Khawar.As long as you are using the Report Generation Toolkit, there is no need to use ActiveX for the purpose of saving the Excel file -- Save Report will do that for you. You can then export (as text) all of the Excel data and use the Write Spreadsheet File to make the .CSV file. Here is how I would rewrite the final bits of your code --
I cleaned up the wires around Excel Easy Table a bit. You'll see I made a VI Icon for Replace Filename, which does (I think) a nicer job of self-documenting than showing its Label. To make the filename, add the correct extension (.xlsx for Excel, .csv for CSV), use Build Path to combine Folder and Filename, and wire to Save Report.
The next two functions add the Extract Everything and Write to Spreadsheet, using a Comma as a separator, which makes a CSV copy for you.
Bob Schor
Maybe you are looking for
-
64 bit OEL install hangs at installing dogtail in OVM 2.2
I recently upgraded my server to OVM 2.2 and swapped out the dual core AMDs to quad core AMDs at the same time. Since then I have been unable to create any 64 bit OEL servers. In every instance the install hangs when Installing dogtail-0.6.1-2.el5.no
-
Frames w/Text-like u can do in Windows Movie maker- Help Please
not referring to Titles. I want fames with text in them, sentences and short paragraphs. I was on this forum until 2:30 am trying to find similar and only 1, referring to typewriter that is in wmm they said on the old HDimovie download which isn't av
-
How to re-set my security questions
I have gone through the steps to re-set my security questions because I forgot one answer but for some reason I am not getting the option to use the alternative email. Can anyone help?
-
Contacts missing "spouse" or "child" information on iphone
Does anyone know how to get ALL information from Macs address book to show on the iphone?
-
My dad died and I need to set the IPAD up as new. How do I do that?
My dad died last May and my mom gave me his iPad to use. I need to set the iPad up as new but having problems. I tried the online restore instructions using iTunes, but I can not read my dads apple password completely. I have his apple ID but the