Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Jul 31, 2012 2:59 pm

Here is what I need to do:

I have Views in MS-SQL Server (2008) I have a Workbook of Pivot Tables that are set to a DSN that is pointed to SQL.

From what I have read the only way to change the datasource is to remake the Workbook. If that is the case thats fine. However once I do this is it possible with Spire.XLS to change the server location/datasource (the new location will have the same views in SQL). If I can do this please let me know as this will be the deciding factor on if I buy this or not.

Thanks,

Jon Poole

interex666
 
Posts: 2
Joined: Tue Jul 31, 2012 2:29 pm

Wed Aug 01, 2012 9:01 am

Hi interex666,

Thanks for your support to us.

I am so sorry that we dont support Pivot Tables with DSN at present, but We will consider adding this function in the next version.

Best wishes. :)

Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Wed Aug 01, 2012 2:50 pm

I dont care about the DSN part....

What I need to know (as simply as possible) is this:

With a SQL connection to a View (in SQL) can I change the datasource to another server

Example:

Excel Doc is originally set to COMPUTERNAME\SQLEXPRESS to a View called PTView I want to set it to COMPUTERNAME2\SQLEXPRESS to a View Called PTView

So the view is identical but the server name has changed.

I am doing this to automate the installation of a static excel doc but the data servername changes with each install.

interex666
 
Posts: 2
Joined: Tue Jul 31, 2012 2:29 pm

Thu Aug 02, 2012 2:14 am

Hi interex666,

I am so sorry for your problem again. We still dont support that you want the function. If your Excel file is Excel 2007/2010 format, I suggest you use OpenXml to update your connection string. You can refer to the following links:
http://msdn.microsoft.com/en-us/library/office/dd941886(v=office.11).aspx
http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.connection.aspx
http://itsreshu.wordpress.com/2011/03/21/update-the-connection-string-of-excel-sheet-using-openxml/

Have a nice day!

Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS