Pull data from asp.net web page using SSIS -


i new ssis. requirement pull data excel spreadsheet in asp.net web page. have pull data page every day. how can achieve this?

decompose problem smaller chunks until have can solve. once you've solved smaller problems, need integrate pieces make cohesive solution.

reading problem statement, see have following needs

  • extract data excel data source (note, problem not specify what should it)
  • acquire excel spreadsheet web page
  • use ssis manage this

extract data

define excel connection manager , configure work file. hope sake format of file consistent data flow task balk if there changes inferred data types.

add data flow task control flow , source, use excel data source , set connection manager excel cm created. select appropriate destination , wire up. note string data out of excel nvarchar/unicode need use data conversion task switch non-unicode type.

download file

given paucity of details, i'm left guess @ needs. therefore, guess excel file link on web page. web page public no login required. further assume file on website going named same thing, http://contoso.com/yogurt.xls if file name changes, http://contoso.com/yogurt_2013-05-19.xls , http://contoso.com/yogurt_2013-05-20.xls etc have sub problem of parsing html find appropriate link.

with of caveats in place, present webclient.downloadfile

string url = @"http://contoso.com/yogurt.xls"; string downloadfile = @"c:\ssisdata\yogurt.xls"; webclient wc = new webclient();  wc.downloadfile(url, downloadfile); 

as hard coded locations, doesn't perform error handling, etc, code not ready primetime demonstrates solution.

use ssis

the above code placed inside script task pass in url , download file variables task have generic file grabbing task.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -