Showing posts with label exports. Show all posts
Showing posts with label exports. Show all posts

Friday, February 17, 2012

CSV Exports are not as expected, columns are missing

I use SQL2005. I have a hard time understanding the reason why the CSV exports are not exporting the report with all the columns. Only the first column of data is exported.
example, I have report like this

Product Customer Jan Feb Mar Apr Jun

p1 C1 12 3 13 7 20

After csv export, I get a bunch of label down the rows, then I see my Product and Customer columns but I can only see Jan. Feb Mar Apr and Jun are NOT exported.

All these columns have exactly the same settings and the report is not a matrix report.

When I export to Excel or HTML, the result is perfect.

Any idea?

Thanks

Philippe

Make sure that Output property is set to Auto or Yes for those textboxes (Textbox Properties dialog -> Data Output tab)|||

Hi,

All these text boxes have the output property set to Auto.

|||Would you like to e-mail your report to me?|||

OK, thanks for your help. I greatly appreciate it. The rdl of one of these reports is on its way.

Thanks,

Philippe

|||

There is a bug here : when Output is set Auto it is translated to No for table columns with Hidden set to an expression.

The workaround is to set Output to Yes for textboxes which should be exported.

CSV Export delimited not fixed

Since RS exports csv files using a comma delimiter, Excel doesn't by
default, open the file correctly. Is there a way to export to csv using a
format which excel will handle correctly using its default settings?
Currently the user must open the file from within Excel and specify
"Delimited" not "Fixed Width" and go through the Text Import Wizard.
Thanks in advance,
Ryan OpferIs there a problem with Excel format?
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> Since RS exports csv files using a comma delimiter, Excel doesn't by
> default, open the file correctly. Is there a way to export to csv using a
> format which excel will handle correctly using its default settings?
> Currently the user must open the file from within Excel and specify
> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> Thanks in advance,
> Ryan Opfer
>|||Thanks Bruce for the quick reply.
The Excel format is fine provided you go through the Text Import Wizard of
Excel and specify that the file is a comma delimited csv file not Fixed
Width. I would like to figure out how to Export from RS using a format in
which Excel will natively open the file as a comma delimited file and
thereby bypass having to have the user go through the Text Import Wizard.
There was a post back in November (Jan Bodey) that said she fixed this by
specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
could have, I wouldn't expect the user to put this in the link anyway.
Does that make more sense?
Thanks,
Ryan
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Is there a problem with Excel format?
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv using
>> a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>|||I just noticed how I worded the subject title. By delimited not fixed, I
ment: default to "Delimited" not "Fixed Width".
Sorry for the confusion.
Ryan
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> Since RS exports csv files using a comma delimiter, Excel doesn't by
> default, open the file correctly. Is there a way to export to csv using a
> format which excel will handle correctly using its default settings?
> Currently the user must open the file from within Excel and specify
> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> Thanks in advance,
> Ryan Opfer
>|||You can render your report as an Excel file. No reason to use the CSV format
in the first place.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
> Thanks Bruce for the quick reply.
> The Excel format is fine provided you go through the Text Import Wizard of
> Excel and specify that the file is a comma delimited csv file not Fixed
> Width. I would like to figure out how to Export from RS using a format in
> which Excel will natively open the file as a comma delimited file and
> thereby bypass having to have the user go through the Text Import Wizard.
> There was a post back in November (Jan Bodey) that said she fixed this by
> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
> could have, I wouldn't expect the user to put this in the link anyway.
> Does that make more sense?
> Thanks,
> Ryan
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> Is there a problem with Excel format?
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv using
>> a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>>
>|||An Excel format is what I tried first but I couldn't get around how Excel
sees the document (it's too smart). Excel sees the document map and puts it
on sheet 1 then on sheet 2 (which has the main table data) it shows drill
down. Ultimately this file will need to be imported into an MS SQL table so
it needs to be simple.
Excel would work fine if I can remove the document map (obviously I can do
this by just removing the document map from the report...and maybe that's
something the user will have to live with) and drill down capabilities (the
user can't live without this though), but by then I'd pretty much be looking
at a plain csv file anyway.
The key here is the user will be doing all this and just sending us back a
basic csv or Excel file for the sql import so thereby has to be a simple
process.
From your reply's, I take it that RS can't defign how it exports to csv or
for that matter Excel.
Thanks for the help,
Ryan
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
> You can render your report as an Excel file. No reason to use the CSV
> format in the first place.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> Thanks Bruce for the quick reply.
>> The Excel format is fine provided you go through the Text Import Wizard
>> of Excel and specify that the file is a comma delimited csv file not
>> Fixed Width. I would like to figure out how to Export from RS using a
>> format in which Excel will natively open the file as a comma delimited
>> file and thereby bypass having to have the user go through the Text
>> Import Wizard.
>> There was a post back in November (Jan Bodey) that said she fixed this by
>> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
>> could have, I wouldn't expect the user to put this in the link anyway.
>> Does that make more sense?
>> Thanks,
>> Ryan
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> Is there a problem with Excel format?
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv
>> using a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>>
>>
>|||Here is an idea for you. Have an additional report that is very plain and
exports to Excel well. Have it be the same as the other on as far as the
data is concerned and the report parameters. Then add a link that uses jump
to URL and have it render the second shadow report as Excel passing it the
parameters from the current report. I call it a shadow report because you
can set it to not be visible in list view so the user never sees it. The
only way it gets run is when they click on the link.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
> An Excel format is what I tried first but I couldn't get around how Excel
> sees the document (it's too smart). Excel sees the document map and puts
it
> on sheet 1 then on sheet 2 (which has the main table data) it shows drill
> down. Ultimately this file will need to be imported into an MS SQL table
so
> it needs to be simple.
> Excel would work fine if I can remove the document map (obviously I can do
> this by just removing the document map from the report...and maybe that's
> something the user will have to live with) and drill down capabilities
(the
> user can't live without this though), but by then I'd pretty much be
looking
> at a plain csv file anyway.
> The key here is the user will be doing all this and just sending us back a
> basic csv or Excel file for the sql import so thereby has to be a simple
> process.
> From your reply's, I take it that RS can't defign how it exports to csv or
> for that matter Excel.
> Thanks for the help,
> Ryan
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
> > You can render your report as an Excel file. No reason to use the CSV
> > format in the first place.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
> >> Thanks Bruce for the quick reply.
> >>
> >> The Excel format is fine provided you go through the Text Import Wizard
> >> of Excel and specify that the file is a comma delimited csv file not
> >> Fixed Width. I would like to figure out how to Export from RS using a
> >> format in which Excel will natively open the file as a comma delimited
> >> file and thereby bypass having to have the user go through the Text
> >> Import Wizard.
> >>
> >> There was a post back in November (Jan Bodey) that said she fixed this
by
> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
> >> could have, I wouldn't expect the user to put this in the link anyway.
> >>
> >> Does that make more sense?
> >>
> >> Thanks,
> >>
> >> Ryan
> >>
> >>
> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
> >> Is there a problem with Excel format?
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> >> Since RS exports csv files using a comma delimiter, Excel doesn't by
> >> default, open the file correctly. Is there a way to export to csv
> >> using a
> >> format which excel will handle correctly using its default settings?
> >> Currently the user must open the file from within Excel and specify
> >> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> >>
> >> Thanks in advance,
> >>
> >> Ryan Opfer
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>|||Thanks Bruce for all the help, I do appreciate it. This sounds like an
adequate solution that I think will work.
It does seems strange though (although seemingly common for MS) to have RS
export to csv using a format that Excel doesn't natively understand by
default. I would have hoped that whatever MS decides to set as a default
format for csv would be the same between MS applications. I guess that's
just something we should all be use to by now anyway.
Ryan Opfer
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:u1VflVAIFHA.3536@.TK2MSFTNGP14.phx.gbl...
> Here is an idea for you. Have an additional report that is very plain and
> exports to Excel well. Have it be the same as the other on as far as the
> data is concerned and the report parameters. Then add a link that uses
> jump
> to URL and have it render the second shadow report as Excel passing it the
> parameters from the current report. I call it a shadow report because you
> can set it to not be visible in list view so the user never sees it. The
> only way it gets run is when they click on the link.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
>> An Excel format is what I tried first but I couldn't get around how Excel
>> sees the document (it's too smart). Excel sees the document map and puts
> it
>> on sheet 1 then on sheet 2 (which has the main table data) it shows drill
>> down. Ultimately this file will need to be imported into an MS SQL table
> so
>> it needs to be simple.
>> Excel would work fine if I can remove the document map (obviously I can
>> do
>> this by just removing the document map from the report...and maybe that's
>> something the user will have to live with) and drill down capabilities
> (the
>> user can't live without this though), but by then I'd pretty much be
> looking
>> at a plain csv file anyway.
>> The key here is the user will be doing all this and just sending us back
>> a
>> basic csv or Excel file for the sql import so thereby has to be a simple
>> process.
>> From your reply's, I take it that RS can't defign how it exports to csv
>> or
>> for that matter Excel.
>> Thanks for the help,
>> Ryan
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
>> > You can render your report as an Excel file. No reason to use the CSV
>> > format in the first place.
>> >
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> >> Thanks Bruce for the quick reply.
>> >>
>> >> The Excel format is fine provided you go through the Text Import
>> >> Wizard
>> >> of Excel and specify that the file is a comma delimited csv file not
>> >> Fixed Width. I would like to figure out how to Export from RS using a
>> >> format in which Excel will natively open the file as a comma delimited
>> >> file and thereby bypass having to have the user go through the Text
>> >> Import Wizard.
>> >>
>> >> There was a post back in November (Jan Bodey) that said she fixed this
> by
>> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if
>> >> I
>> >> could have, I wouldn't expect the user to put this in the link anyway.
>> >>
>> >> Does that make more sense?
>> >>
>> >> Thanks,
>> >>
>> >> Ryan
>> >>
>> >>
>> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> >> Is there a problem with Excel format?
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> >> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> >> default, open the file correctly. Is there a way to export to csv
>> >> using a
>> >> format which excel will handle correctly using its default settings?
>> >> Currently the user must open the file from within Excel and specify
>> >> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> >>
>> >> Thanks in advance,
>> >>
>> >> Ryan Opfer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>|||For some reason, Excel doesn't understand Unicode CSV files by default. If
we did an ANSI CSV file (which you can specify in the DeviceInfo) then we
would lose data in certain scenarios. We could look at all of the characters
in the file and see whether we could use ANSI without data loss but this is
a lot of work.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:%23ETGwjAIFHA.1172@.TK2MSFTNGP12.phx.gbl...
> Thanks Bruce for all the help, I do appreciate it. This sounds like an
> adequate solution that I think will work.
>
> It does seems strange though (although seemingly common for MS) to have RS
> export to csv using a format that Excel doesn't natively understand by
> default. I would have hoped that whatever MS decides to set as a default
> format for csv would be the same between MS applications. I guess that's
> just something we should all be use to by now anyway.
>
> Ryan Opfer
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:u1VflVAIFHA.3536@.TK2MSFTNGP14.phx.gbl...
>> Here is an idea for you. Have an additional report that is very plain and
>> exports to Excel well. Have it be the same as the other on as far as the
>> data is concerned and the report parameters. Then add a link that uses
>> jump
>> to URL and have it render the second shadow report as Excel passing it
>> the
>> parameters from the current report. I call it a shadow report because you
>> can set it to not be visible in list view so the user never sees it. The
>> only way it gets run is when they click on the link.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
>> An Excel format is what I tried first but I couldn't get around how
>> Excel
>> sees the document (it's too smart). Excel sees the document map and puts
>> it
>> on sheet 1 then on sheet 2 (which has the main table data) it shows
>> drill
>> down. Ultimately this file will need to be imported into an MS SQL table
>> so
>> it needs to be simple.
>> Excel would work fine if I can remove the document map (obviously I can
>> do
>> this by just removing the document map from the report...and maybe
>> that's
>> something the user will have to live with) and drill down capabilities
>> (the
>> user can't live without this though), but by then I'd pretty much be
>> looking
>> at a plain csv file anyway.
>> The key here is the user will be doing all this and just sending us back
>> a
>> basic csv or Excel file for the sql import so thereby has to be a simple
>> process.
>> From your reply's, I take it that RS can't defign how it exports to csv
>> or
>> for that matter Excel.
>> Thanks for the help,
>> Ryan
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
>> > You can render your report as an Excel file. No reason to use the CSV
>> > format in the first place.
>> >
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> >> Thanks Bruce for the quick reply.
>> >>
>> >> The Excel format is fine provided you go through the Text Import
>> >> Wizard
>> >> of Excel and specify that the file is a comma delimited csv file not
>> >> Fixed Width. I would like to figure out how to Export from RS using
>> >> a
>> >> format in which Excel will natively open the file as a comma
>> >> delimited
>> >> file and thereby bypass having to have the user go through the Text
>> >> Import Wizard.
>> >>
>> >> There was a post back in November (Jan Bodey) that said she fixed
>> >> this
>> by
>> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if
>> >> I
>> >> could have, I wouldn't expect the user to put this in the link
>> >> anyway.
>> >>
>> >> Does that make more sense?
>> >>
>> >> Thanks,
>> >>
>> >> Ryan
>> >>
>> >>
>> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> >> Is there a problem with Excel format?
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> >> Since RS exports csv files using a comma delimiter, Excel doesn't
>> >> by
>> >> default, open the file correctly. Is there a way to export to csv
>> >> using a
>> >> format which excel will handle correctly using its default
>> >> settings?
>> >> Currently the user must open the file from within Excel and specify
>> >> "Delimited" not "Fixed Width" and go through the Text Import
>> >> Wizard.
>> >>
>> >> Thanks in advance,
>> >>
>> >> Ryan Opfer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>

Tuesday, February 14, 2012

CSV Export delimited not fixed

Since RS exports csv files using a comma delimiter, Excel doesn't by
default, open the file correctly. Is there a way to export to csv using a
format which excel will handle correctly using its default settings?
Currently the user must open the file from within Excel and specify
"Delimited" not "Fixed Width" and go through the Text Import Wizard.
Thanks in advance,
Ryan OpferIs there a problem with Excel format?
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> Since RS exports csv files using a comma delimiter, Excel doesn't by
> default, open the file correctly. Is there a way to export to csv using a
> format which excel will handle correctly using its default settings?
> Currently the user must open the file from within Excel and specify
> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> Thanks in advance,
> Ryan Opfer
>|||Thanks Bruce for the quick reply.
The Excel format is fine provided you go through the Text Import Wizard of
Excel and specify that the file is a comma delimited csv file not Fixed
Width. I would like to figure out how to Export from RS using a format in
which Excel will natively open the file as a comma delimited file and
thereby bypass having to have the user go through the Text Import Wizard.
There was a post back in November (Jan Bodey) that said she fixed this by
specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
could have, I wouldn't expect the user to put this in the link anyway.
Does that make more sense?
Thanks,
Ryan
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
> Is there a problem with Excel format?
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv using
>> a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>|||I just noticed how I worded the subject title. By delimited not fixed, I
ment: default to "Delimited" not "Fixed Width".
Sorry for the confusion.
Ryan
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> Since RS exports csv files using a comma delimiter, Excel doesn't by
> default, open the file correctly. Is there a way to export to csv using a
> format which excel will handle correctly using its default settings?
> Currently the user must open the file from within Excel and specify
> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> Thanks in advance,
> Ryan Opfer
>|||You can render your report as an Excel file. No reason to use the CSV format
in the first place.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
> Thanks Bruce for the quick reply.
> The Excel format is fine provided you go through the Text Import Wizard of
> Excel and specify that the file is a comma delimited csv file not Fixed
> Width. I would like to figure out how to Export from RS using a format in
> which Excel will natively open the file as a comma delimited file and
> thereby bypass having to have the user go through the Text Import Wizard.
> There was a post back in November (Jan Bodey) that said she fixed this by
> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
> could have, I wouldn't expect the user to put this in the link anyway.
> Does that make more sense?
> Thanks,
> Ryan
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> Is there a problem with Excel format?
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv using
>> a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>>
>|||An Excel format is what I tried first but I couldn't get around how Excel
sees the document (it's too smart). Excel sees the document map and puts it
on sheet 1 then on sheet 2 (which has the main table data) it shows drill
down. Ultimately this file will need to be imported into an MS SQL table so
it needs to be simple.
Excel would work fine if I can remove the document map (obviously I can do
this by just removing the document map from the report...and maybe that's
something the user will have to live with) and drill down capabilities (the
user can't live without this though), but by then I'd pretty much be looking
at a plain csv file anyway.
The key here is the user will be doing all this and just sending us back a
basic csv or Excel file for the sql import so thereby has to be a simple
process.
From your reply's, I take it that RS can't defign how it exports to csv or
for that matter Excel.
Thanks for the help,
Ryan
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
> You can render your report as an Excel file. No reason to use the CSV
> format in the first place.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> Thanks Bruce for the quick reply.
>> The Excel format is fine provided you go through the Text Import Wizard
>> of Excel and specify that the file is a comma delimited csv file not
>> Fixed Width. I would like to figure out how to Export from RS using a
>> format in which Excel will natively open the file as a comma delimited
>> file and thereby bypass having to have the user go through the Text
>> Import Wizard.
>> There was a post back in November (Jan Bodey) that said she fixed this by
>> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
>> could have, I wouldn't expect the user to put this in the link anyway.
>> Does that make more sense?
>> Thanks,
>> Ryan
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> Is there a problem with Excel format?
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> default, open the file correctly. Is there a way to export to csv
>> using a
>> format which excel will handle correctly using its default settings?
>> Currently the user must open the file from within Excel and specify
>> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> Thanks in advance,
>> Ryan Opfer
>>
>>
>>
>|||Here is an idea for you. Have an additional report that is very plain and
exports to Excel well. Have it be the same as the other on as far as the
data is concerned and the report parameters. Then add a link that uses jump
to URL and have it render the second shadow report as Excel passing it the
parameters from the current report. I call it a shadow report because you
can set it to not be visible in list view so the user never sees it. The
only way it gets run is when they click on the link.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
> An Excel format is what I tried first but I couldn't get around how Excel
> sees the document (it's too smart). Excel sees the document map and puts
it
> on sheet 1 then on sheet 2 (which has the main table data) it shows drill
> down. Ultimately this file will need to be imported into an MS SQL table
so
> it needs to be simple.
> Excel would work fine if I can remove the document map (obviously I can do
> this by just removing the document map from the report...and maybe that's
> something the user will have to live with) and drill down capabilities
(the
> user can't live without this though), but by then I'd pretty much be
looking
> at a plain csv file anyway.
> The key here is the user will be doing all this and just sending us back a
> basic csv or Excel file for the sql import so thereby has to be a simple
> process.
> From your reply's, I take it that RS can't defign how it exports to csv or
> for that matter Excel.
> Thanks for the help,
> Ryan
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
> > You can render your report as an Excel file. No reason to use the CSV
> > format in the first place.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
> >> Thanks Bruce for the quick reply.
> >>
> >> The Excel format is fine provided you go through the Text Import Wizard
> >> of Excel and specify that the file is a comma delimited csv file not
> >> Fixed Width. I would like to figure out how to Export from RS using a
> >> format in which Excel will natively open the file as a comma delimited
> >> file and thereby bypass having to have the user go through the Text
> >> Import Wizard.
> >>
> >> There was a post back in November (Jan Bodey) that said she fixed this
by
> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if I
> >> could have, I wouldn't expect the user to put this in the link anyway.
> >>
> >> Does that make more sense?
> >>
> >> Thanks,
> >>
> >> Ryan
> >>
> >>
> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
> >> Is there a problem with Excel format?
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
> >> Since RS exports csv files using a comma delimiter, Excel doesn't by
> >> default, open the file correctly. Is there a way to export to csv
> >> using a
> >> format which excel will handle correctly using its default settings?
> >> Currently the user must open the file from within Excel and specify
> >> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
> >>
> >> Thanks in advance,
> >>
> >> Ryan Opfer
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
>|||Thanks Bruce for all the help, I do appreciate it. This sounds like an
adequate solution that I think will work.
It does seems strange though (although seemingly common for MS) to have RS
export to csv using a format that Excel doesn't natively understand by
default. I would have hoped that whatever MS decides to set as a default
format for csv would be the same between MS applications. I guess that's
just something we should all be use to by now anyway.
Ryan Opfer
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:u1VflVAIFHA.3536@.TK2MSFTNGP14.phx.gbl...
> Here is an idea for you. Have an additional report that is very plain and
> exports to Excel well. Have it be the same as the other on as far as the
> data is concerned and the report parameters. Then add a link that uses
> jump
> to URL and have it render the second shadow report as Excel passing it the
> parameters from the current report. I call it a shadow report because you
> can set it to not be visible in list view so the user never sees it. The
> only way it gets run is when they click on the link.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
> news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
>> An Excel format is what I tried first but I couldn't get around how Excel
>> sees the document (it's too smart). Excel sees the document map and puts
> it
>> on sheet 1 then on sheet 2 (which has the main table data) it shows drill
>> down. Ultimately this file will need to be imported into an MS SQL table
> so
>> it needs to be simple.
>> Excel would work fine if I can remove the document map (obviously I can
>> do
>> this by just removing the document map from the report...and maybe that's
>> something the user will have to live with) and drill down capabilities
> (the
>> user can't live without this though), but by then I'd pretty much be
> looking
>> at a plain csv file anyway.
>> The key here is the user will be doing all this and just sending us back
>> a
>> basic csv or Excel file for the sql import so thereby has to be a simple
>> process.
>> From your reply's, I take it that RS can't defign how it exports to csv
>> or
>> for that matter Excel.
>> Thanks for the help,
>> Ryan
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
>> > You can render your report as an Excel file. No reason to use the CSV
>> > format in the first place.
>> >
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> >> Thanks Bruce for the quick reply.
>> >>
>> >> The Excel format is fine provided you go through the Text Import
>> >> Wizard
>> >> of Excel and specify that the file is a comma delimited csv file not
>> >> Fixed Width. I would like to figure out how to Export from RS using a
>> >> format in which Excel will natively open the file as a comma delimited
>> >> file and thereby bypass having to have the user go through the Text
>> >> Import Wizard.
>> >>
>> >> There was a post back in November (Jan Bodey) that said she fixed this
> by
>> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if
>> >> I
>> >> could have, I wouldn't expect the user to put this in the link anyway.
>> >>
>> >> Does that make more sense?
>> >>
>> >> Thanks,
>> >>
>> >> Ryan
>> >>
>> >>
>> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> >> Is there a problem with Excel format?
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> >> Since RS exports csv files using a comma delimiter, Excel doesn't by
>> >> default, open the file correctly. Is there a way to export to csv
>> >> using a
>> >> format which excel will handle correctly using its default settings?
>> >> Currently the user must open the file from within Excel and specify
>> >> "Delimited" not "Fixed Width" and go through the Text Import Wizard.
>> >>
>> >> Thanks in advance,
>> >>
>> >> Ryan Opfer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>|||For some reason, Excel doesn't understand Unicode CSV files by default. If
we did an ANSI CSV file (which you can specify in the DeviceInfo) then we
would lose data in certain scenarios. We could look at all of the characters
in the file and see whether we could use ANSI without data loss but this is
a lot of work.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
news:%23ETGwjAIFHA.1172@.TK2MSFTNGP12.phx.gbl...
> Thanks Bruce for all the help, I do appreciate it. This sounds like an
> adequate solution that I think will work.
>
> It does seems strange though (although seemingly common for MS) to have RS
> export to csv using a format that Excel doesn't natively understand by
> default. I would have hoped that whatever MS decides to set as a default
> format for csv would be the same between MS applications. I guess that's
> just something we should all be use to by now anyway.
>
> Ryan Opfer
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:u1VflVAIFHA.3536@.TK2MSFTNGP14.phx.gbl...
>> Here is an idea for you. Have an additional report that is very plain and
>> exports to Excel well. Have it be the same as the other on as far as the
>> data is concerned and the report parameters. Then add a link that uses
>> jump
>> to URL and have it render the second shadow report as Excel passing it
>> the
>> parameters from the current report. I call it a shadow report because you
>> can set it to not be visible in list view so the user never sees it. The
>> only way it gets run is when they click on the link.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> news:%23V19fKAIFHA.2784@.TK2MSFTNGP09.phx.gbl...
>> An Excel format is what I tried first but I couldn't get around how
>> Excel
>> sees the document (it's too smart). Excel sees the document map and puts
>> it
>> on sheet 1 then on sheet 2 (which has the main table data) it shows
>> drill
>> down. Ultimately this file will need to be imported into an MS SQL table
>> so
>> it needs to be simple.
>> Excel would work fine if I can remove the document map (obviously I can
>> do
>> this by just removing the document map from the report...and maybe
>> that's
>> something the user will have to live with) and drill down capabilities
>> (the
>> user can't live without this though), but by then I'd pretty much be
>> looking
>> at a plain csv file anyway.
>> The key here is the user will be doing all this and just sending us back
>> a
>> basic csv or Excel file for the sql import so thereby has to be a simple
>> process.
>> From your reply's, I take it that RS can't defign how it exports to csv
>> or
>> for that matter Excel.
>> Thanks for the help,
>> Ryan
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:%23VOimb4HFHA.3076@.tk2msftngp13.phx.gbl...
>> > You can render your report as an Excel file. No reason to use the CSV
>> > format in the first place.
>> >
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> > "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> > news:uQS0Du3HFHA.3332@.TK2MSFTNGP15.phx.gbl...
>> >> Thanks Bruce for the quick reply.
>> >>
>> >> The Excel format is fine provided you go through the Text Import
>> >> Wizard
>> >> of Excel and specify that the file is a comma delimited csv file not
>> >> Fixed Width. I would like to figure out how to Export from RS using
>> >> a
>> >> format in which Excel will natively open the file as a comma
>> >> delimited
>> >> file and thereby bypass having to have the user go through the Text
>> >> Import Wizard.
>> >>
>> >> There was a post back in November (Jan Bodey) that said she fixed
>> >> this
>> by
>> >> specifying rc:Encoding=ASCII, but I couldn't get this to work, and if
>> >> I
>> >> could have, I wouldn't expect the user to put this in the link
>> >> anyway.
>> >>
>> >> Does that make more sense?
>> >>
>> >> Thanks,
>> >>
>> >> Ryan
>> >>
>> >>
>> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> >> news:e5%2331j3HFHA.1476@.TK2MSFTNGP09.phx.gbl...
>> >> Is there a problem with Excel format?
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Ryan Opfer" <ropfer@.usa.ibs.org> wrote in message
>> >> news:OkccOY3HFHA.1108@.TK2MSFTNGP10.phx.gbl...
>> >> Since RS exports csv files using a comma delimiter, Excel doesn't
>> >> by
>> >> default, open the file correctly. Is there a way to export to csv
>> >> using a
>> >> format which excel will handle correctly using its default
>> >> settings?
>> >> Currently the user must open the file from within Excel and specify
>> >> "Delimited" not "Fixed Width" and go through the Text Import
>> >> Wizard.
>> >>
>> >> Thanks in advance,
>> >>
>> >> Ryan Opfer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>

CSV Export Bug

Hello,
I have a report that displays data from SQL Server, and it also has a
subscription that exports the report as a CSV file to a network share on
specified schedule. There is another external app that picks up the CSV file
and imports it into a proprietary database.
The report uses a stored procedure on the SQL Server to query data that is
displays on the report. When the query returns data, everything works well.
However, there are times when there is no data returned from the query (an
empty result set). If that happens, the report itself looks fine, but the
exported CSV is messed up. When I open up the exported CSV into a text
editor, all it shows is "table1". I am not sure where its getting "table1"
from, but logically, if there is no data to be reported, I would expect the
CSV to contain the headers (field names) and no data. Obviously, the
external app that imports this CSV is not smart enough to recognize that
"table1" means no data and the entire import process crashes.
If there are any workarounds or hot fixes for this bug, I would like to find
out about them ASAP since this is a production system.
Thank you,
MHAROONNo replies, so do I assume that no one else has run into this issue? This is
a pretty serious issue for us, so I would appreciate any help.
"mharoon" wrote:
> Hello,
> I have a report that displays data from SQL Server, and it also has a
> subscription that exports the report as a CSV file to a network share on
> specified schedule. There is another external app that picks up the CSV file
> and imports it into a proprietary database.
> The report uses a stored procedure on the SQL Server to query data that is
> displays on the report. When the query returns data, everything works well.
> However, there are times when there is no data returned from the query (an
> empty result set). If that happens, the report itself looks fine, but the
> exported CSV is messed up. When I open up the exported CSV into a text
> editor, all it shows is "table1". I am not sure where its getting "table1"
> from, but logically, if there is no data to be reported, I would expect the
> CSV to contain the headers (field names) and no data. Obviously, the
> external app that imports this CSV is not smart enough to recognize that
> "table1" means no data and the entire import process crashes.
> If there are any workarounds or hot fixes for this bug, I would like to find
> out about them ASAP since this is a production system.
> Thank you,
> MHAROON

CSV

I am attempting to exports the results of a stored Procedure into a CSV. The
table is a temp tabel named #FinalPrivate. I need to allow a user to download
the file from a .NET Web Application. Is there someone that can point me in a
direction?
This sounds like a one-time, or not frequent need. If the results are
<65000 records, it is probaby easiest to highlight the results in query
analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to copy
to the clipboard, and then paste those values into Excel. Then, in Excel,
choose to "save as" type = comma delimited / CSV.
I do this often and it's easier than your alternatives. If you need an
automated way that works by itself every 24 hours, then that's a different
story.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> I am attempting to exports the results of a stored Procedure into a CSV.
The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
download
> the file from a .NET Web Application. Is there someone that can point me
in a
> direction?
|||Yes, this is something that needs to be done ~5 times a week by customers on
demand. I need to complete this task programable. Any other thoughts?
"HK" wrote:

> This sounds like a one-time, or not frequent need. If the results are
> <65000 records, it is probaby easiest to highlight the results in query
> analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to copy
> to the clipboard, and then paste those values into Excel. Then, in Excel,
> choose to "save as" type = comma delimited / CSV.
> I do this often and it's easier than your alternatives. If you need an
> automated way that works by itself every 24 hours, then that's a different
> story.
> "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
> wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> The
> download
> in a
>
>
|||Why not simply creating a DTS (or SSIS if you're on 2005) package that will
create that CSV file? Then it is a one click execute process.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com> a
crit dans le message de news:
7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
>I am attempting to exports the results of a stored Procedure into a CSV.
>The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
> download
> the file from a .NET Web Application. Is there someone that can point me
> in a
> direction?
|||It seems this is an ASP.NET issue, and not a TSQL issue. You simply take
the results of the stored procedure and output as comma delimited in your
..NET code. Here is a very quick example I just pulled from google; it is
not be the best for your needs. The trick for letting the user vjew the
file is the line that outputs the "contenttype" to the browser.
http://dotnet.org.za/keithrull/archi.../14/39202.aspx
That example is more meant for Excel output but I share it because it goes
into detail about things.
However, I prefer to use a method with ContentType="text/csv", which lets
the user download the file immediately as a CSV file. Look for an example
with that. To quote Jim Buyens in a google groups thread, he writes:
If you're only sending data, the easiest approach is to execute this code:
Response.ContentType = "text/csv"
Response.AddHeader "content-disposition",_
"attachment; filename=yourfile.csv"
then send the visitor a comma-separated-values file via Response.Write, then
call Response.End to make sure that no HTML or other output follows the
data.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:D9471EF6-7601-47A6-A723-5B1045B150F6@.microsoft.com...
> Yes, this is something that needs to be done ~5 times a week by customers
on[vbcol=seagreen]
> demand. I need to complete this task programable. Any other thoughts?
> "HK" wrote:
copy[vbcol=seagreen]
Excel,[vbcol=seagreen]
different[vbcol=seagreen]
news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...[vbcol=seagreen]
CSV.[vbcol=seagreen]
me[vbcol=seagreen]
|||Try www.sqlscripter.com to export data to text/csv.
It's free.
"sorourke1@.hotmail.com" wrote:

> I am attempting to exports the results of a stored Procedure into a CSV. The
> table is a temp tabel named #FinalPrivate. I need to allow a user to download
> the file from a .NET Web Application. Is there someone that can point me in a
> direction?

CSV

I am attempting to exports the results of a stored Procedure into a CSV. The
table is a temp tabel named #FinalPrivate. I need to allow a user to download
the file from a .NET Web Application. Is there someone that can point me in a
direction?This sounds like a one-time, or not frequent need. If the results are
<65000 records, it is probaby easiest to highlight the results in query
analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to copy
to the clipboard, and then paste those values into Excel. Then, in Excel,
choose to "save as" type = comma delimited / CSV.
I do this often and it's easier than your alternatives. If you need an
automated way that works by itself every 24 hours, then that's a different
story.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> I am attempting to exports the results of a stored Procedure into a CSV.
The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
download
> the file from a .NET Web Application. Is there someone that can point me
in a
> direction?|||Yes, this is something that needs to be done ~5 times a week by customers on
demand. I need to complete this task programable. Any other thoughts?
"HK" wrote:
> This sounds like a one-time, or not frequent need. If the results are
> <65000 records, it is probaby easiest to highlight the results in query
> analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to copy
> to the clipboard, and then paste those values into Excel. Then, in Excel,
> choose to "save as" type = comma delimited / CSV.
> I do this often and it's easier than your alternatives. If you need an
> automated way that works by itself every 24 hours, then that's a different
> story.
> "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
> wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> > I am attempting to exports the results of a stored Procedure into a CSV.
> The
> > table is a temp tabel named #FinalPrivate. I need to allow a user to
> download
> > the file from a .NET Web Application. Is there someone that can point me
> in a
> > direction?
>
>|||Why not simply creating a DTS (or SSIS if you're on 2005) package that will
create that CSV file? Then it is a one click execute process.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com> a
écrit dans le message de news:
7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
>I am attempting to exports the results of a stored Procedure into a CSV.
>The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
> download
> the file from a .NET Web Application. Is there someone that can point me
> in a
> direction?|||It seems this is an ASP.NET issue, and not a TSQL issue. You simply take
the results of the stored procedure and output as comma delimited in your
.NET code. Here is a very quick example I just pulled from google; it is
not be the best for your needs. The trick for letting the user vjew the
file is the line that outputs the "contenttype" to the browser.
http://dotnet.org.za/keithrull/archive/2005/07/14/39202.aspx
That example is more meant for Excel output but I share it because it goes
into detail about things.
However, I prefer to use a method with ContentType="text/csv", which lets
the user download the file immediately as a CSV file. Look for an example
with that. To quote Jim Buyens in a google groups thread, he writes:
If you're only sending data, the easiest approach is to execute this code:
Response.ContentType = "text/csv"
Response.AddHeader "content-disposition",_
"attachment; filename=yourfile.csv"
then send the visitor a comma-separated-values file via Response.Write, then
call Response.End to make sure that no HTML or other output follows the
data.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:D9471EF6-7601-47A6-A723-5B1045B150F6@.microsoft.com...
> Yes, this is something that needs to be done ~5 times a week by customers
on
> demand. I need to complete this task programable. Any other thoughts?
> "HK" wrote:
> > This sounds like a one-time, or not frequent need. If the results are
> > <65000 records, it is probaby easiest to highlight the results in query
> > analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to
copy
> > to the clipboard, and then paste those values into Excel. Then, in
Excel,
> > choose to "save as" type = comma delimited / CSV.
> >
> > I do this often and it's easier than your alternatives. If you need an
> > automated way that works by itself every 24 hours, then that's a
different
> > story.
> >
> > "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
> > wrote in message
news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> > > I am attempting to exports the results of a stored Procedure into a
CSV.
> > The
> > > table is a temp tabel named #FinalPrivate. I need to allow a user to
> > download
> > > the file from a .NET Web Application. Is there someone that can point
me
> > in a
> > > direction?
> >
> >
> >|||How do you create this DTS Package for exporting into a text file? I would
like to create and copy into a flat text file, but only see Bulk Insert that
will copy into SQL Tables. Could you provide some insight into how to export
using DTS.
Thanks!
"Christian Hamel" wrote:
> Why not simply creating a DTS (or SSIS if you're on 2005) package that will
> create that CSV file? Then it is a one click execute process.
>
> "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com> a
> écrit dans le message de news:
> 7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> >I am attempting to exports the results of a stored Procedure into a CSV.
> >The
> > table is a temp tabel named #FinalPrivate. I need to allow a user to
> > download
> > the file from a .NET Web Application. Is there someone that can point me
> > in a
> > direction?
>
>|||Try www.sqlscripter.com to export data to text/csv.
It's free.
"sorourke1@.hotmail.com" wrote:
> I am attempting to exports the results of a stored Procedure into a CSV. The
> table is a temp tabel named #FinalPrivate. I need to allow a user to download
> the file from a .NET Web Application. Is there someone that can point me in a
> direction?

CSV

I am attempting to exports the results of a stored Procedure into a CSV. The
table is a temp tabel named #FinalPrivate. I need to allow a user to downloa
d
the file from a .NET Web Application. Is there someone that can point me in
a
direction?This sounds like a one-time, or not frequent need. If the results are
<65000 records, it is probaby easiest to highlight the results in query
analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to copy
to the clipboard, and then paste those values into Excel. Then, in Excel,
choose to "save as" type = comma delimited / CSV.
I do this often and it's easier than your alternatives. If you need an
automated way that works by itself every 24 hours, then that's a different
story.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
> I am attempting to exports the results of a stored Procedure into a CSV.
The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
download
> the file from a .NET Web Application. Is there someone that can point me
in a
> direction?|||Yes, this is something that needs to be done ~5 times a week by customers on
demand. I need to complete this task programable. Any other thoughts?
"HK" wrote:

> This sounds like a one-time, or not frequent need. If the results are
> <65000 records, it is probaby easiest to highlight the results in query
> analyzer (hit CTRL - A on any cell to select all cells), hit CTRL-C to cop
y
> to the clipboard, and then paste those values into Excel. Then, in Exce
l,
> choose to "save as" type = comma delimited / CSV.
> I do this often and it's easier than your alternatives. If you need an
> automated way that works by itself every 24 hours, then that's a different
> story.
> "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
> wrote in message news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com..
.
> The
> download
> in a
>
>|||Why not simply creating a DTS (or SSIS if you're on 2005) package that will
create that CSV file? Then it is a one click execute process.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com> a
crit dans le message de news:
7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
>I am attempting to exports the results of a stored Procedure into a CSV.
>The
> table is a temp tabel named #FinalPrivate. I need to allow a user to
> download
> the file from a .NET Web Application. Is there someone that can point me
> in a
> direction?|||It seems this is an ASP.NET issue, and not a TSQL issue. You simply take
the results of the stored procedure and output as comma delimited in your
.NET code. Here is a very quick example I just pulled from google; it is
not be the best for your needs. The trick for letting the user vjew the
file is the line that outputs the "contenttype" to the browser.
http://dotnet.org.za/keithrull/arch...7/14/39202.aspx
That example is more meant for Excel output but I share it because it goes
into detail about things.
However, I prefer to use a method with ContentType="text/csv", which lets
the user download the file immediately as a CSV file. Look for an example
with that. To quote Jim Buyens in a google groups thread, he writes:
If you're only sending data, the easiest approach is to execute this code:
Response.ContentType = "text/csv"
Response.AddHeader "content-disposition",_
"attachment; filename=yourfile.csv"
then send the visitor a comma-separated-values file via Response.Write, then
call Response.End to make sure that no HTML or other output follows the
data.
"sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com>
wrote in message news:D9471EF6-7601-47A6-A723-5B1045B150F6@.microsoft.com...
> Yes, this is something that needs to be done ~5 times a week by customers
on[vbcol=seagreen]
> demand. I need to complete this task programable. Any other thoughts?
> "HK" wrote:
>
copy[vbcol=seagreen]
Excel,[vbcol=seagreen]
different[vbcol=seagreen]
news:7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...[vbcol=seagreen]
CSV.[vbcol=seagreen]
me[vbcol=seagreen]|||How do you create this DTS Package for exporting into a text file? I would
like to create and copy into a flat text file, but only see Bulk Insert that
will copy into SQL Tables. Could you provide some insight into how to expor
t
using DTS.
Thanks!
"Christian Hamel" wrote:

> Why not simply creating a DTS (or SSIS if you're on 2005) package that wil
l
> create that CSV file? Then it is a one click execute process.
>
> "sorourke1@.hotmail.com" <sorourke1hotmailcom@.discussions.microsoft.com> a
> écrit dans le message de news:
> 7C1D66D1-7038-4084-B139-68D3C7DBB18B@.microsoft.com...
>
>|||Try www.sqlscripter.com to export data to text/csv.
It's free.
"sorourke1@.hotmail.com" wrote:

> I am attempting to exports the results of a stored Procedure into a CSV. T
he
> table is a temp tabel named #FinalPrivate. I need to allow a user to downl
oad
> the file from a .NET Web Application. Is there someone that can point me i
n a
> direction?