SSIS Import Excel Cell Properties

I'd like to use SSIS to import MS Excel Properties - e.g. Color for each cell. 
Does anyone have an example of this - values are straightforward, but cell properties are not.
Thank you,
John

Thank you - this is a great start.
The above is a great example using SSIS  Script Component - and part of this concept should work. If I use it like it's written I will need about 3600 variables for a 60column by 60 row spreadsheet.
I'm wondering if I can do a loop and If clause to retrieve only those cell references- that specifically meet cell color fill criteria (ie Interior.ColorIndex=7) and put those Cell References either in an array (probably easiest) which can be parsed
later from SQL Server.
This is what I have come up with sans loop/array.
' Microsoft SQL Server Integration Services Script Component
' Write scripts using Microsoft Visual Basic 2008.
' ScriptMain is the entry point class of the script.
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub PreExecute()
MyBase.PreExecute()
' Add your code here for preprocessing or remove if not needed
End Sub
Public Overrides Sub PostExecute()
MyBase.PostExecute()
' Add your code here for postprocessing or remove if not needed
' You can set read/write variables here, for example:
' Me.Variables.MyIntVar = 100
End Sub
Public Overrides Sub CreateNewOutputRows()
Dim oExcel As Object = CreateObject("Excel.Application")
Dim FileName As String
FileName = Variables.FileName
Dim oBook As Object = oExcel.Workbooks.Open(FileName)
Dim oSheet As Object = oBook.Worksheets(1)
Output0Buffer.AddRow()
' This will take too many rows.
Output0Buffer.Address = oSheet.Range("B4").Interior.ColorIndex
End Sub
End Class
John

Similar Messages

  • How do I import Excel cell data in to an already built custom list.

    I have a custom list that we are using as an End Of Shift Report.
    I would like to expand the list to incorporate some of our process data. (We are a paper mill). We have a data historian, PI Process Book, that has an Excel add-in, that allows us to import the process data in to Excel.
    I am able to do the "import spreadsheet" function and get the data in to a new list. What I can't figure out is either how to import directly in to the custom list I have already created, or how to import from the new list to the custom list.
    I could use the "new list" as a container for several different process points if I could figure out how to load the process data in to the custom list.
    We are currently using WSS3, but are upgrading in either the 4th Q this year, or Q1 2014.
    Any other suggestions on how to display single point data (End of Shift Inventory calculations for example) in a custom sharepoint list are welcome.
    I want to take a tank level reading, which we monitor and multiply it by X gallons per foot, then load the total gallons in to the custom list

    1) Open WSS List, and Export it to Excel
    2) Open the Excel file you want to import
    3) Copy the cells in the source and paste them into the Excel file openned from the WSS List (only highlight one row to paste, it will fill down)
    4) You will see vaildation errors (yellow triangles), if there are any, correct them
    5) In the menubar go Data --> List --> Sync List
    6) You will see a blue status bar fill in the bottom left as data is copied up to the List   
    Or you can try the below tools
    > SharePoint Excel Import 2.5
    http://www.boostsolutions.com/sharepoint-excel-import.html
    > Import Excel data to SharePoint List.
    http://spreadsheet2splist.codeplex.com/
    Regards MuSa

  • Script for setting Imported Excel Table Cell Inset

    InDesign CS3 Windows XP
    I've checked the FAQ and ran all the searches, but I can't find this. My old computer crashed and took with it a script that I had that would set all the cell insets for the cells of the imported Excel tables in one swelled foop. Can someone point me to the source again? My price sheets are nothing but imported Excel tables and it takes forever to set all the insets for each block separately.
    Thanks,
    JAG

    Phah.
    app.documents.everyItem().stories.everyItem().tables.everyItem().cells.everyItem().propert ies = [topInset:"1cm"]; //??
    This one-liner may need some additional work, but when I am done with it, it'll set the insets for all tables in every open document.
    Perhaps 'everyItem' also works on disk files ...
    [Edit] Just pulling your leg. I'll take a look on the one-liner when I'm back at work.
    I've got a class in a couple of weeks on Javascripting ...
    I'm jealous. They give classes about this? BTW, JavaScript is not that hard (e.g., not harder than any other reasonably popular programming language), but its interface to InDesign is something else. In this case, the magic word is 'everyItem'. (You'll learn.)

  • Adding hyperlinks to imported excel file cells

    Good Afternoon All,
    I am having trouble assigning hyperlinks and defining names to the individual cells of an imported excel file (import into Visio). Ideally, I would like to be able to hyperlink shapes in other Visio pages (of the same
    workbook) to individual cells of the imported excel file and vice versa.  Is there any way of doing this? 
    Please let me know if I can clarify.
    -Tom

    In a similar thread from a few days ago:
    Albert Geven wrote:
    > You can also download from the developer zone our excel (goop)
    >library.
    >search for philips and you'll find it.
    We've used this with good success for creating multiple worksheets. If you
    like goop, its great. It may be worth a look for you. It's at this link
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&42E12CDCDBD1C682
    8625699D004EEFA8&cat=9C6DF90777E5A78206256874000FA14E
    Spencer
    "Jeff - PPL" wrote in message
    news:[email protected]..
    > Is it possible to send data to two different worksheets in an excel
    > file? For example, I have raw data and then calculations from that
    > raw data. Right now I have the raw data being sent to the exc
    el file.
    > I would like to be able to send the calculation results to the same
    > file but a new worksheet. Is this possible?
    >
    > Thanks

  • Dimension Overrride with Two properties referencing Excel Cells

    Hi Gurus,
    I'm using a Dimension override as the one below. It works fine. I can reference two properties and one of them is an Excel cell:
    =EPMDimensionOverride(D31;"D_PO";"P_ALOC_NR=03 AND P_CTRY="&D3)
    However, I would like to add some flexibility to the first property, too. I would like to also reference it to another Excel cell instead of hardcoding the value 03. I've been trying several commands but nothing seems to work.
    Any clue? BPC NW 10.0 Add-in SP17
    Thanks,
    Alberto Sabate

    I think the issue was due to leading zero of the property value P_ALOC_NR=03
    Try "P_ALOC_NR=""03"" AND...
    Or "P_ALOC_NR='03' AND...
    Ups, sorry, the linked cell has to be formatted as text to accept 03 without conversion.
    Vadim

  • "DBSTATUS_UNAVAILABLE" Error while importing Excel File

    Hello,
    I am getting following error while importing data from Excel 2003 to SQL server using SSIS 2008,  [Excel Source [1]] Error: There was an error with output "Excel Source Output" (9) on component "Excel Source" (1). The column status
    returned was: "DBSTATUS_UNAVAILABLE".
    If i open the excel file and done any editing then the same file loads without any issue. Can you guide me why it's  happening ? , i have edited "TypeGuessRow" property to 0 , IMEX = 1 but no help.
    Thanks

    Hi Ved_Prakash,
    The error is generic and can occur due to various causes. In order to troubleshoot this issue, I need to clarify some information:
    Could you please post some sample data for that column in the error message?
    Have you modify some properties after accessing data from that Excel file?
    Since the error message is incomplete, could you post other error messages from the Output pane?
    Besides, we can also use
    SQL Server Import Export Wizard to import Excel into SQL Server database.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Import Excel 2007 into SQL Server 2005

    Hi
    When importing Excel 2007 data into sql via Import wizard:
    choose "Microsoft Office 12.0 Access Database Engine OLE DB
    Provider" as the data source in SQL Server Import and Export Wizard, then click Properties, switch to the All tab, input your excel file path to the Data source field and input "Excel 12.0" to the Extended Properties field and then click OK to follow the wizard.
    I get the following error:
    Error 0xc0202009: Source An OLE DB error has occurred. Error code: 0x80004005
    Error 0xc02020e8: Source Opening a rowset for failed
    Exception from HRRESULT: 0xc02020e8 (Microsoft.sqlserver.dtspipelinewrap)
    I have recently upgraded to Vista and did not have this problem in XP, does anybody know how to fix this, as I really need to get the data into SQL server 2005 (without using SSIS)
    Thanks!

    Hi Jin
    This is not a problem in SSIS, this is a problem occuring when I try to import data via the Import/Export wizard in Management studio.
    This is the exact error I get:
    Error 0xc0202009: Source 
    - <table_name>[1]: An OLE DB error has occurred. 
    Error code:
    0x80004005
    Error 0xc02020e8: Source 
    - <table_name>[1]: Opening a rowset for “<table_name” failed.
    Check that the object exists in the database.
    Additional information:
    Exception from HRRESULT: 0xc02020e8 (Microsoft.sqlserver.dtspipelinewrap)
    Many thanks!!

  • Web Dynpro read excel cell

    Hi,
    How can I read a specific excel cell via Web Dynpro ?
    It will be great if someone will provide a short sample of code for that ...
    10x in advance
    Hadar

    Hi Chandran i followed you steps regarding  to upload excel sheet data to webdynpro table.
    but iam not get clarity how to do this step.
    Note : You cannot Read the Content from the excel file directly
    First You Have to copy that file to the Server,
    And from the Server you can get the file absolute path
    With the absolute path you can read the contents of the Excel file
    You have to save the Excel file as .xls Format and Not as xlsx format i will not accept that...
    help me onthis step, i need  to develop the this feature in application.
    you posted like this
    Hi
    First You have to download the jxl.jar file. You can get this file from the Below site
    JExcelApi v2.6.4 (1747kbytes)
    It will be in Compressed Fromat So Unzip it to get the Contents
    After Unzipping The File You will get a Folder (jexcelapi/jxl.jar)
    Now in NWDS open web dynpro explorer, Right Click Your Project, a popup menu will appear and in that click Properties
    You will get window displaying your Project Properties
    On Left Side of the window You Will Find "Java Build Path"
    Click That "Java Build Path" and you will get 4 Tabs Showing ( Source,Projects,Libraries,Order and Export)
    Click Libraries Tab
    You will find options many options buttons
    In that click the Button "Add External Jars"
    You will get Window in order to fecth the jxl.jar file from the location you had stored
    After selecting the jxl.jar i will get displayed and click ok
    Now Open Navigator
    Open Your Project
    You will find Lib folder
    Copy the jxl.jar to that lib folder
    Note : You cannot Read the Content from the excel file directly
    First You Have to copy that file to the Server,
    And from the Server you can get the file absolute path
    With the absolute path you can read the contents of the Excel file
    You have to save the Excel file as .xls Format and Not as xlsx format i will not accept that...
    You have Upload the Excel file from the Server Using the File Upload UI Element
    This Coding will extract 3 columns from the Xls File
    Coding
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import jxl.Cell;
    import jxl.Sheet;
    import jxl.Workbook;
    import com.sap.fileupload.wdp.IPrivateFileUpload_View;
    import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource;
    public void onActionUpload_File(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_File(ServerEvent)
        IPrivateFileUpload_View.IContextElement element1 = wdContext.currentContextElement();
        IWDResource resource = element1.getFileResource();
        element1.setFileName(resource.getResourceName());
        element1.setFileExtension(resource.getResourceType().getFileExtension());
        //@@end
    public void onActionUpload_File_in_Server(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_File_in_Server(ServerEvent)
        InputStream text=null;
        int temp=0;
        try
             File file = new File(wdContext.currentContextElement().getFileResource().getResourceName().toString());
             FileOutputStream op = new FileOutputStream(file);
             if(wdContext.currentContextElement().getFileResource()!=null)
                  text=wdContext.currentContextElement().getFileResource().read(false);
                  while((temp=text.read())!=-1)
                       op.write(temp);                                      
             op.flush();
             op.close();
             path = file.getAbsolutePath();
             wdComponentAPI.getMessageManager().reportSuccess(path);
        catch(Exception e)
             e.printStackTrace();
        //@@end
    public void onActionUpload_Data_into_Table(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_Data_into_Table(ServerEvent)
        try
              Workbook wb =Workbook.getWorkbook(new File(path));
              Sheet sh = wb.getSheet(0);
              //wdComponentAPI.getMessageManager().reportSuccess("Columns = "+sh.getColumns());
              //wdComponentAPI.getMessageManager().reportSuccess("Rows = "+sh.getRows());
              int columns = sh.getColumns();
              int rows = sh.getRows();
              int i=0;
             for(int j=1;j<=rows;j++)
                       ele=wdContext.nodeTable_Data().createTable_DataElement();
                       Cell c1 = sh.getCell(i,j);
                      ele.setTab_Name(c1.getContents());
                       Cell c2 = sh.getCell(i+1,j);
                       ele.setTab_Degree(c2.getContents());
                          Cell c3 = sh.getCell(i+2,j);
                       ele.setTab_Percentage(c3.getContents());
                       wdContext.nodeTable_Data().addElement(ele);
        catch(Exception ex)
             wdComponentAPI.getMessageManager().reportSuccess(ex.toString());
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      String path;
      IPrivateFileUpload_View.ITable_DataElement ele;
    //@@end
    Regards
    Chandran S

  • Help needed with referencing single Excel cells and formatting resulting text

    In InDesign CS5 I am putting together a 20pp catalogue of about 200 products. The plan is to have the product information, SKU code, quantity etc fixed, but have the prices (there are two i.e. pack price and individual price) being linked to an Excel spreadsheet. This is so that the prices can be updated in the Excel file and the InDesign file will pull the new prices through. In case you are wondering why I don't pull the whole set of information through, this is because there are a lot of copywriting changes done to the information once it's in InDesign - it's only going to be the prices that will be updated.
    I am planning on having two single cell tables in their own text frame, duly formatted with cell style, table style and paragraph style for the two price variables. This I am then going to have to repeat 200 times making sure I link to the next row down in Excel. This is going to be a hideous task but I see know way of modifying the cell in InDesign to point it to the next row in Excel. That's my first problem.
    My second problem is this. In the Excel sheet, the prices are formatted as UK currency and are therefore like this...
    £2.00
    £0.40
    £1.43
    £9.99
    £0.99
    £0.09
    What I will require is once I import that data (and refresh the data via a newly saved Excel file) is that the prices end up like this...
    £2.00
    40p
    £1.43
    £9.99
    99p
    9p
    So if the value is lower than £1.00 it needs a trailing 'p' added  and the leading zero and '£' sign stripped off. If the value is lower than £0.10 it also needs the zero after the decimal point stripping off.
    Then formatting wise, the '£' sign needs to be superscripted and the same for the 'p'. This I am assuming could be done via GREP?
    In summary, can anyone help with the first task of referecing the Excel cells on a cell by cell basis, given that it is the same cell column each time, but the next row down, and also point me in the right direction of the price formattting issues.
    Any help will be gratefully received.

    I would do this:
    Create on line with the formatting.
    Export as InDesign tagged text (TXT)
    Read out these tags
    In Excel exists a function to connect text from several cells and predfined text, there connect the content from cells with the paragraph styling tags. Do it in a seperate sheet. (Better would be to use a database like Access, there you can link your Excel sheet).
    Export this sheet as txt file
    Place this sheet as tagged text (there is an option in one of the sialog boxes).
    In preferences  < file handling you can specify that Tablecalculation Sheets and text is not embedded but linked, turn it on.

  • IMporting Excel Spreadsheets

    Hello
    We recently upgraded RH in our company from x5 to HTML 6,
    build 099. In a project I worked on with X5, I had imported Excel
    spreadsheets saved as html and generated a primary layout without
    any problem. However, in 6, when I would generate a layout, it
    would get to Updating Files and RH would crash without any error. I
    narrowed it down to 10 html files that were all Excel spreadsheets
    saved as html and imported into my project in x5. If I deleted
    those 10 files, the project would generate the layout. If I
    imported any of those files, it would crash again.
    To recreate the spreadsheets in RH wold just be too time
    consuming, and really inefficient as I expect to get regular
    updates on these spreadsheets to have available on this website via
    our intranet. Has anyone encountered this before? and
    recommendations?
    Thanks!

    Hi BradPrid and welcome to our community
    Did these spreadsheet files have any conditional text
    applied? If so, I believe a problem exists with merged table cells
    (which seem quite likely coming from Excel) when you use
    conditional text.
    If you can't seem to sort it, one thought would be to simply
    import the Excel HTML files as baggage files. Then simply link to
    them or maybe use redirects.
    Cheers... Rick

  • Bug - Import Excel File into Indesign cs5.5

    Hi,
    I'm doing a complex Indesign file with a link to a Excel file.
    To import the Excel file I have created several tables always using styles (table, cell, paragraph).
    The problem born when I make a correction into the file Excel and I update the link in Indesign.
    The text updated automatically bring a caracther style (the first that I have created).
    I don't want to apply any character style, but I want to maintein the paragraph style that I have applied.
    If I delete all caracther styles the problem is solved, but I need to have caracther styles in my layout.
    Anyone can help me?
    Thanks to all
    Elisa

    The import facility of Excel or Word Document is only on a PC system of Dreamweaver.
    File >> Import >> Excel Document
    File >> Import >> Word Document
    For mac system I understand this facility isn't there.  What can you do about this?
    1) Get hold of a PC and download a trial version of DW and import the file(s) and you are done;
    2) Ask a friend to do it for you;
    3) Post your excel file online and some nice guy like Nancy, john or Murray will help you out.
    Good luck and let us know if this has given you some more ideas to explore.
    Good Guy
    Website: http://mytaxsite.co.uk
    Website: http://html-css.co.uk
    Forums: http://mytaxsite.boardhost.com
    Email: http://mytaxsite.co.uk/contact-us

  • Retaining changes and format  of  imported excel data.. please help.

    Is there some kind of secret that Im mising out on that will allow me to make changes to the data in the excel cell range in which I import to an InDesign document?
    It was working fine, until I had to add a line of data to the import field range, and now it asks me every time I open the InDesign file to apply changes.. And now when I update said imported data, it comes up as little red dots, and I have to change all of the cell parameters to get the text to show.
    Obviously this is very annoying, and Im hoping there is an easy solution. Im thinking it must involve re-linking the data in the InDesign file, and I must be doing something wrong not to be able to get it to keep the changes I've made and the format it is in so that I do not have to the "red dot" fix every day.
    Hopefully Ive explained this well enough.. Im dying for some help :)
    Thanks in advance
    J

    Im not sure I want it to not keep the link..
    I'll explain what Im using InDesign for, maybe it will help..
    I use it to update daily information (numbers/data) for a publication. I update and save all of the info in the Excel files that contain the data, and then I use InDesign to place all of the data together in a file (which I then turn into a PDF).
    All of the other data that Im pulling into the InDesign file from the same excel file do not go all screwy and give me red dots, only the one box of info that Ive had to add a line of data to.. and like I say, now it updates and pulls into InDesign as different font size and red dots.
    If I turn of that link option like you say, will my daily info still update and pull into the InDesign file?
    Again, thanks for your help.
    J

  • OBIEE 11.1.1.6.7 export to excel - cells not suppressing

    When exporting a table to Excel, cells are repeating in the excel report, despite the fact that these columns are set to "Suppress" in Column Format.
    The values are suppressed in the table on the dashboard, the values are suppressed when we export to PDF, but when we export to Excel suppression is not working.
    We have another report where suppression is working fine when exporting to excel so it does not seem to be due to which excel version we are using.
    The suppression in excel worked fine in 10g for this report, and when we migrated to 11g, that is when it stopped working.
    When comparing the two different reports, we can't find any difference in properties that could affect the suppression.
    Any ideas on what we can do to fix this?
    Best Regards
    Joel
    Edited by: joel_s on May 10, 2013 1:56 PM

    Hi,
    This is a known issue.
    To my knowledge, not solved...
    Check document 1535547.1.
    Regards.

  • BEX Analyzer 7.0 - Use the content of an excel cell as an input value

    Hi all,
    Is it possible to use the content of an excel cell as an input value for a bex variavel?
    Iu2019m using bex analyzer 7.0.
    Thanks in advance,
    Cátia Coelho Silva

    Hi Catia,
    Yes it is possible to import values from exel. But this will gives you "INCORRECT INPUT PARAMATERS"..
    So it is still best to use "Notepad" as your import file type.
    Just copy your input parameters on the notepad then upload it via 'import text file'.
    Please be sure to use Multiple selection type variable.

  • Import Excel events, dates info to iCal

    I cannot seem to find the easy way to import excel events, dates, birthday, games etc. into iCal. There has to be an easy way.

    Hi jkuyio
    1. Regarding the connection string and the provider, are you using 64 bit or 32 bit?
    2. By the way, Your question is not related to this forum i think. I mean you can use SSIS for this and work with SQL Server database as well but i think this is not the right way to do it!
    In any case you can check this link for more information on connecting the MySQL from SSIS:
    http://blogs.msdn.com/b/mattm/archive/2008/03/03/connecting-to-mysql-from-ssis.aspx
    * Basically you can connect to any data source that you have the right data provider.
    ** Data from Excel spreadsheet can be exported to a new MySQL database table directly, by using the Export Excel Data to New Table optionhttp://dev.mysql.com/doc/refman/5.6/en/mysql-for-excel-export.html
    ** Data can be import into the MySQL as well:
    http://www.w3resource.com/mysql/exporting-and-importing-data-between-mysql-and-microsoft-excel.php
    I hope this is useful :-)
    [Personal Site] [Blog] [Facebook]

Maybe you are looking for

  • How can I get a PC connect to my home Airport Extreme network ?

    HELP!  I'm trying to get a new PC (that we know has a working wireless card-it works fine at Best Buy) to connect to my home Airport Express network? It's an older Apple Airport, but I have multiple Mac's of various ages, an iPad, 2 iPhone 4S & an iP

  • Update Purchase Order number.(Link GL to PO)

    Hi all, Currently i am using the below query for one of our report(R12). However there is a need to update Purchase Order Number .Could anyone please help on how to link GL to PO and provide the updated query.The query is as follows. SELECT gjl.je_li

  • Photos in an album labelling inconsistently!

    I have recklessly upgraded to OS X Yosemite 10.10.3 and consequently downloaded the execrable Photos program to my Mac.  My current major problem is when I add photos to an album, I cannot label them.  Or at least, some of my labels are applied, wher

  • FTP Server login

    I'm trying to connect to a ftp server. I use "Go - Connect to Server" and type in the address: ftp://name. This is a secure server and normally requires a user name and password. I can't figure out where to enter the required information. Any ideas o

  • Can't configure xorg with any of the methods in the wiki...

    I've installed arch on (yet another) old PC. I installed xorg, the drivers for my VGA (S3 Savage 4) and got to the point where I'm supposed to configure X. Xorg -configure: Never worked for me, so it was no surprise it failed to work again. hwd -xa: