?
Solved

My exported CVS file contains equal signs in every field

Posted on 2011-05-06
8
Medium Priority
?
387 Views
Last Modified: 2012-05-11
We use our development tool to export all of our grid boxes to excel.  The issue we are seeing is that when the system automatically loads up the file, every field has an "=" sign in from of the field

='test'
or
='12345555'

yet - when we save the file as a CSV to the desktop, and then reopen it - the equal signs disappear.

thoughts ?

jim
0
Comment
Question by:Jackson_62
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:gfdos
ID: 35707584
= is a reserved symbol in excel that means "a formula comes after this"

so essentially each cell when imported is being imported as a formula rather than a value.

nothing to worry about really.
0
 
LVL 3

Expert Comment

by:gfdos
ID: 35707594
What are you trying to do here, do you want the "=" to go away?
0
 
LVL 10

Expert Comment

by:Tyler Laczko
ID: 35707604
your fields are being exported as formulas
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 

Author Comment

by:Jackson_62
ID: 35707627
Yes - the problem is the = is causing each field to look like a formula.  I woudl prefer the = sign does not apaper in the file at all.  The odd thing is some people can export and it looks ok (I have verified excel versions, service packs, etc.) of people runnign the same version of excel and getting different results.

yes - the goal would be to remove the = before it gets to the file.  Again, the oddd thing is when I save the file physically to my computer and reopen it - the '=' signs are gone
0
 
LVL 3

Expert Comment

by:gfdos
ID: 35707799
You said "We use our development tool to export all of our grid boxes to excel."
So what is doing the Export --  you need to make sure that isn't exporting them as formulas....
0
 
LVL 10

Accepted Solution

by:
ReneGe earned 1500 total points
ID: 35710796
Here is my idea on resolving this.

I'm to tired to make sure it's not buggy so if one of you feels like reviewing it, have fun.

Cheers,
Rene

 
@ECHO OFF

SETLOCAL enabledelayedexpansion

SET TempFile=%~n0_%random%.txt
IF EXIST %TempFile% DEL %TempFile%

IF "%~1" == "" (
	REM for test purposes, CSVFile will have the same name as your batch file but with the .csv extension.
		SET CSVFile=%~dpn0.csv
	REM CREATING THE CSV FILE
		ECHO line1,=test>"!CSVFile!"
		ECHO line2,=12345555>>"!CSVFile!"
) ELSE (
	SET CSVFile=%~1
)

REM FIXING THE CSV FILE
	FOR /F "usebackq delims=" %%A IN ("%CSVFile%") DO (
		echo %%A
		SET Line=%%A
		SET Line=!Line:^==!
		ECHO !Line!>>%TempFile%
	)

IF EXIST "%CSVFile%" REN "%CSVFile%" "%CSVFile%.BAK"
IF EXIST "%TempFile%" REN "%TempFile%" "%CSVFile%"

Open in new window

0
 

Author Closing Comment

by:Jackson_62
ID: 35834916
gave me a solution fo how to change the formula but did not really help me understand why my development tool kit would be doing this (even when I view the file in notepad and do not see any '=' signs
0
 
LVL 10

Expert Comment

by:ReneGe
ID: 35835062
Glad I could help.

At least you have the solution to resolve the simptoms.

Cheers,
Rene
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question