Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

Thursday, March 29, 2012

Do not export navigations

Hi,
Is there a way NOT to export the navigation within reports?
I often use navigation to other reports, but when I export
those reports to excel, the links are still there and are more
a pain in the *ss then helping me managing the data...

any ideas?
thx,
Frank M.One option is to have a report parameter (Export) and hide the controls when this parameter is selected.|||That would be an option, thx.
Do you know if it's also possible to 'hide' the "Hyperlink Action" in a similar way?
I can't put a function there to check if a parameter is true or false...|||I think you would use an =IF(condition,true,false) statement to check for the parameter directly in the hyperlink box.)
=IIF(Parameters!DrilldownType.Value="-1",false,Parameters!DrilldownType.Value)
The Drill Down Type parameter would be the name of the report you are trying to access.|||I can't get a function in the hyperlink-action...
it's a link to an other report|||Where is the hyperlink action you are trying to access? The one I am looking at is under the textbox properties, advanced, navigation.

Do not export navigations

Hi,
Is there a way NOT to export the navigation within reports?
I often use navigation to other reports, but when I export
those reports to excel, the links are still there and are more
a pain in the *ss then helping me managing the data...

any ideas?
thx,
Frank M.One option is to have a report parameter (Export) and hide the controls when this parameter is selected.|||That would be an option, thx.
Do you know if it's also possible to 'hide' the "Hyperlink Action" in a similar way?
I can't put a function there to check if a parameter is true or false...|||I think you would use an =IF(condition,true,false) statement to check for the parameter directly in the hyperlink box.)
=IIF(Parameters!DrilldownType.Value="-1",false,Parameters!DrilldownType.Value)
The Drill Down Type parameter would be the name of the report you are trying to access.|||I can't get a function in the hyperlink-action...
it's a link to an other report|||Where is the hyperlink action you are trying to access? The one I am looking at is under the textbox properties, advanced, navigation.

Wednesday, March 21, 2012

Do a lot of linked tables cause block?

Hello, everyone:
There are a lot of Access and Excel tables linked to my SQL Server (SQL2K SP3 on W2K). The end users update those likned tables. I am wondering if there is the block problem. If yes, how to prevent that? Thanks.
ZYTNo, It should not cause any problems. How did you bring it into sql2k

Monday, March 19, 2012

DML delete issues

Hi all,

I'm trying to return a processed Excel XML document from a stored procedure.

The procedure pulls a template document in XML format from a table, inserts data using DML and returns the result. The problem I've hit is in removing worksheets from the document prior to returning it. Inserts work fine when I try to remove a worksheet everything hangs. I'm thinking this could be a namespace problem, but am at a loss.

A small example(assume that @.XML contains a standard ExcelXML document):

set @.XML.modify('declare namespace ss="urnTongue Tiedchemas-microsoft-comSurprisefficeTongue Tiedpreadsheet";
declare namespace o="urnTongue Tiedchemas-microsoft-comSurprisefficeSurpriseffice";
declare namespace x="urnTongue Tiedchemas-microsoft-comSurpriseffice:excel";
delete (/ss:Workbook[1]/ss:Worksheet[1])')

Any help greatly appreciated...

Regards,

Andy

I tried your case (delete the first Worksheet from a excel file in 2003 xml format) and it works fine:

Code Snippet

declare @.x xml = '<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>jinghaol</Author>
<LastAuthor>jinghaol</LastAuthor>
<Created>2007-04-24T16:15:41Z</Created>
<LastSaved>2007-04-24T16:17:18Z</LastSaved>
<Company>Microsoft</Company>
<Version>12.00</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>12345</WindowHeight>
<WindowWidth>18960</WindowWidth>
<WindowTopX>120</WindowTopX>
<WindowTopY>75</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row>
<Cell><Data ss:Type="String">adsf</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Selected/>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet2">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row>
<Cell><Data ss:Type="String">asdf</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet3">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row ss:Index="2">
<Cell><Data ss:Type="String">asdf</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>1</ActiveRow>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>'
select @.x
set @.x.modify('
declare namespace ss="urn:schemas-microsoft-com:office:spreadsheet";
declare namespace o="urn:schemas-microsoft-com:office:office";
declare namespace x="urn:schemas-microsoft-com:office:excel";
delete (/ss:Workbook[1]/ss:Worksheet[1])')
select @.x
go

I couldn't exactly copy/paste/run your query because the editor puts many Tongue Tied and Surprise in namespace declare part.