Excel Version of CSV file

plcnovel

Member
Join Date
Feb 2006
Location
LHR
Posts
215
Hi All
I have a generic I/O file (excel file). I fill in that file with all the I/O point and then i create tags using this information in csv file format. The problem is my csv file (that i create) can not be used to import the newly created tags to Rslogix5000. I open my csv created file and rslogix5000 exported csv file in a NOTEPAD editor and i have notcied that the following things:

In rslogix 5000 exported file

remark,"CSV-Import-Export"
remark,"Date = Mon Sep 10 09:20:52 2007"
remark,"Version = RSLogix 5000 v15.01"
remark,"Owner = EFX"
remark,"Company = Enerflex System Ltd."
0.3
TYPE,SCOPE,NAME,DESCRIPTION,DATATYPE,SPECIFIER,ATTRIBUTES
TAG,,Local:1:C,"","AB:1769_OF8C:C:0","",""
TAG,,Local:1:I,"","AB:1769_OF8C:I:0","",""
TAG,,Local:1:O,"","AB:1769_OF8C:O:0","",""
TAG,,Local:2:I,"","AB:1769_DI16:I:0","",""
TAG,,Local:3:C,"","AB:1769_DO16:C:0","",""
TAG,,Local:3:I,"","AB:1769_DO16:I:0","",""
TAG,,Local:3:O,"","AB:1769_DO16:O:0","",""

In my created CSV file

remark,CSV-Import-Export,,,,,
remark,Date = Mon Sep 10 09:20:52 2007,,,,,
remark,Version = RSLogix 5000 v15.01,,,,,
remark,Owner = EFX,,,,,
remark,Company = Enerflex System Ltd.,,,,,
0.3,,,,,,
TYPE,SCOPE,NAME,DESCRIPTION,DATATYPE,SPECIFIER,ATTRIBUTES
ALIAS ,,Engine_Speed,,,Addr[1],
ALIAS ,,Engine_Oil_Temperature,,,Addr[2],
ALIAS ,,Manifold Temperature,,,Addr[3],

As you can see that format is totally different, is there a way i can make my csv file exactly the same format as rslogix5000 accepts it? Thanks in advance

Regards
 
Change your program to add extra " to the string.

your code
string= "CSV-Import-Export"

change this to:

string= chr(32)+"CSV-Import-Export"+chr(32)
In the case the string contains the "

Regards
 
Hi Thanks
DO i have to add Char(32) + Char(32) in every line of my code where i am copying my tags into CSV file? Or i just have to add it in the first 6 lines?
 
The problem with line 1 to 5 is solved like I wrote.

TAG,,Local:1:C,"","AB:1769_OF8C:C:0","",""
ALIAS ,,Engine_Speed,,,Addr[1],
The problem with these lines is unkwown to me. I do not have much experience with RSLogix5000. It seems there is some conversion from symbol to address before writing the csv with RSLogix5000. Problably you need to do this conversion also.

The extra , after 0.3 are ignored by excel, empry data is added to the colls.
 
It's possible that your problem is related to your Regional Options settings in Windows. I'm using XP Pro set to "English (United States)" and Office Professional 2003. When I start with a csv file exported from RSLogix5000, edit it in Excel, and then save it as a csv file, I do not get the same output as your example. Mine will re-import without any additional steps.

You can try changing Windows settings and Excel settings but that may cause problems with other programs. However, rather than customizing your regional settings or changing options in Excel to fix the problem, perhaps using a different editor might help. Google "csv editor" and you will find many options. I can't remember which one I used before, but it was simple and free. (I don't have access to my home computer right now to check.) The key features to a csv editor for your use are:

Let's you edit in a spreadsheet view like Excel.
Doesn't alter or add any data automatically (Excel does this a lot).

Hopefully this will help,
 

Similar Topics

Hi, I'm trying to export data from a DataGrid to Excel using VBA, but I'm getting an error "Object doesn't support this property or method". The...
Replies
0
Views
72
I don't know if this is the right place for the subject at least I'll try. The company has one of the oldest computers that is a master Windows...
Replies
5
Views
735
Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
529
Hello, I want to send the data from Rslogix500 to Excel. I created a connection between RSlinx and Excel. The values in Excel automatically...
Replies
5
Views
1,164
Hi guys, Im back again, this time I cannot minimized excel even though i put 6 on the exec mode.. this is my cicode.. Exec("C:\Program...
Replies
1
Views
1,090
Back
Top Bottom