Publishing Excel Named Ranges to SharePoint Programmatically -


i have excel file named ranges saved in document library in sharepoint. created excel web access web parts in order display excel files have. problem can't seem find way publish excel files named ranges show up.

i know can done manually setting browser view options when saving sharepoint need via code because need run on multiple sharepoint sites.

i checking visio services , saw had serverpublishoptions wondering if excel service have similar can use. looking @ publishobjects of excel interop i'm not sure if address issue.

this code select range , insert sharepoint list using ado, easy way me.

public const strsharepointinfo = "provider=microsoft.ace.oledb.12.0;wss;imex=0;retrieveids=yes;database=http://sharepoint.server.com/path/;list={12312456-124a-78bc-b8e7-1e526b74a015};"  sub insertrecordsetonsharepoint(rg range,shtname string) 'bruno leite 'http://officevb.com  dim cn adodb.connection 'conexao para lista sharepoint dim integer,sql string   'sql insert sql = "insert [listname] (select * [excel 12.0;database=" & shtname & "].["& rg.name &"$])"  'open connection cn.open strsharepointinfo  'run sql cn.execute sql  set cn = nothing  debug.print "insert ok"  end sub 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -