Selecting Missing Days from a given range of Date  from a table

Dear Oracle Guru's
Consider the following table
txndetails
Rundate date
Txncnt Number
userid varchar2(100)
Data will be as follows
Rundate txncnt userid
17-Nov-2009 4 admin
18-Nov-2009 7 admin
21-Nov-2009 3 admin
23-Nov-2009 4 admin
We populate this table on the basis of txn generated. This is supposed to run daily based on the transactions. Certain days there wont be any transaction at all. hence there will be no entry on this table .
At any given point of time , we would like to know the days on which there is no entries in this table
In the above sample data, there is no entries on 19th, 20th and 22nd
we have to list out those days
I got confused while trying some methods
Kindly guide me in this regard
with warm regards
Ssr

Hi,
As Centinul and Bhushan said, you need a list of all the possible dates; "CONNECT BY LEVEL <= x" is an efficient way to generate such a list in Oracle SQL.
Once you have the list of all days, you can use MINUS, like Centinul or Bhushan did. You can also use an outer join, as shown below.
WITH  extrema     AS
     SELECT     TRUNC (MIN (rundate))     AS start_date
     ,     TRUNC (MAX (rundate))     AS end_date
     FROM     txndetails
all_days     AS
     SELECT     start_date + LEVEL - 1     AS a_date
     ,     start_date + LEVEL        AS next_date
     FROM     extrema
     CONNECT BY     LEVEL <= 1 + end_date - start_date
SELECT     a.a_date
FROM          all_days     a
LEFT OUTER JOIN     txndetails     t     ON     t.rundate >= a.a_date
                                 AND     t.rundate <  a.next_date
WHERE   t.rundate     IS NULL
;Remember that all DATEs include hours, minutes and seconds. In the list of all days that you generate, the hours, minutes and seconds will probably be 00:00:00; be careful if the hours, minutes and seconds in your actual DATEs are not always 00:00:00.
The query above shows missing dates between the first date that is actually in the table and the last date in the table.
In practice, most people are interested in a deffierent range, such as all dates between two given parameters, or all dates within the last year.
If that's the case, you don't need the sub-query extrema; you can use the paremters (or compute the values) in all_days, based on dual.
For example, to get the most recent 365 days:
WITH     all_days     AS
     SELECT     TRUNC (SYSDATE) + LEVEL - 365     AS a_date
     ,     TRUNC (SYSDATE) + LEVEL - 364       AS next_date
     FROM     dual
     CONNECT BY     LEVEL <= 365
SELECT     a.a_date
...          -- Same as beforeEdited by: Frank Kulash on Nov 23, 2009 10:54 AM

Similar Messages

  • Selecting a range of data from a file

    Is it possible to only display a selected range of data from a binary file? I can read in my binary files but I would like to only send data within a user defineable range to the data portal for viewing. This range may be over multiple binary files also. I can concatenate these files already but I need to select a range to insert into the data portal.
    Thanks,
    AJL

    OK AJL,
    This sounds good. It's convenient to have the start and stop time of each segment file in the name of that file. By the way, you want to check that in the DataPlugin and "Call RaiseError()" if the data file is not named that way, otherwise you will try to read DIAdem *.DAT files with your custom DataPlugin. DIAdem will try each DataPlugin that is registered with the file's extension (i.e. *.DAT) one after the other, until one of them does not give an error. So you should always check for some identifying characteristic in your data file and "Call RaiseError()" if you don't find it, in order to abort DIAdem using that DataPlugin for files it was never intended for.
    Now to your point. How do you know which series of segment files to read from? Does your VBScript ask the user to select a particular directory that contains all these segment files? I'm going to assume so. My recommendation is that your VBScript also create a time slice configuration file in that directory that contains the information about the time slice you want to read in (start and stop times). Then your DataPlugin can look for that file name in the directory passed to it-- if it finds none it will just load the file path it was passed outright, but if it does find the time slice file it will load any and all *.DAT files in that same directory which correspond to that time slice. This includes loading only parts of one or more of the existing binary files.
    It is straightforward enough to pick out the section of the binary file you want to load with the DataPlugin, once you know the time slice information inside the DataPlugin's callback. Use the File.Position property to move the file cursor to the position of the first data point in the time slice, and use the Block.BlockLength property to specify the number of values to read in each of the channels from that starting point (to exclude the values after the desired time slice). I assume that your binary data is stored interleaved and that you are using DirectAccessChannels to read the values in your DataPlugin.
    Finally, for time slices that span multiple segment files, you will need to load these to separate groups in the Data Portal with the DataPlugin. Then the VBScript can consolidate these channels into long concatenated channels in a new group and delete the temporary segmented groups. In a future version of DIAdem the DataPlugin API will have the ability to do this mapping for you, but not yet. I also have VBScripts that do this concatenation already-- you can download them from www.ni.com/support/diasupp. They're designed for concatenating channels from multiple ASCII/Excel/DAT files.
    Let me know what else you need,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Passing a range of dates from Visual Composer 7.0 to Bex Analyzer

    Dear Experts,
             I created a button in my Visual Composer model that has the following settings:
    System action:  Hyperlink
    Apply to:  Self
    Hyperlink address:  "...QUERY=BMMSEG_C01_SAS_Q0001&BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=MBUDAT&BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=08/22/2006;08/28/2006"
            Basically, what I need is to pass a range of dates from Visual Composer to Bex Analyzer on the characteristic "MBUDAT".  However, it only brings back the data with those specific dates, not the range.  
          I don't think this is the correct syntax to pass in a range value:  08/22/2006;08/28/2006  Please advise how should I do it. 
    Thank you in advance,
    Kevin

    Hi J GOEL,
           Thank you for your quick response.  I created a date range variable ZPSTDAT, and then I passed in the oncatenated value to my Bex query (for this example, let says the From date is 08/22/2006, and the To date is 08/28/2006 ).
          Here's what I passed in into the url:
    ...QUERY= BMMSEG_C01_SAS_Q0001
    &#38;BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE
    &#38;BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1
    &#38;BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC= ZPSTDAT
    &#38;BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING= 08/22/2006:08/28/2006
       However, it returns all the records, so it seems like it doesn't even accept the range value that I passed into the Bex.  Do you mind to please show me the url you have that pass in the date range.  I just need to see the date range part, not the entire url.
    Thanks,
    Kevin

  • How to display data from a recordset based on data from another recordset

    How to display data from a recordset based on data from
    another recordset.
    What I would like to do is as follows:
    I have a fantasy hockey league website. For each team I have
    a team page (clubhouse) which is generated using PHP/MySQL. The one
    area I would like to clean up is the displaying of the divisional
    standings on the right side. As of right now, I use a URL variable
    (division = id2) to grab the needed data, which works ok. What I
    want to do is clean up the url abit.
    So far the url is
    clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
    I want is clubhouse.php?team=Wings.
    I have a separate table, that has the teams entire
    information (full team name, short team, abbreviation, conference,
    division, etc. so I was thinking if I could somehow do this:
    Recordset Team Info is filtered using URL variable team
    (short team). Based on what team equals, it would then insert this
    variable into the Divisional Standings recordset.
    So example: If I type in clubhouse.php?team=Wings, the Team
    Info recordset would bring up the Pacific division. Then 'Pacific'
    would be inserted into the Divisional Standings recordset to
    display the Pacific Division Standings.
    Basically I want this
    SELECT *
    FROM standings
    WHERE division = <teaminfo.division>
    ORDER BY pts DESC
    Could someone help me, thank you.

    Assuming two tables- teamtable and standings:
    teamtable - which has entire info about the team and has a
    field called
    "div" which has the division name say "pacific" and you want
    to use this
    name to get corresponding details from the other table.
    standings - which has a field called "division" which you
    want to use to
    give the standings
    SELECT * FROM standings AS st, teamtable AS t
    WHERE st.division = t.div
    ORDER BY pts DESC
    Instead of * you could be specific on what fields you want to
    select ..
    something like
    SELECT st.id AS id, st.position AS position, st.teamname AS
    team
    You cannot lose until you give up !!!
    "Leburn98" <[email protected]> wrote in
    message
    news:[email protected]...
    > How to display data from a recordset based on data from
    another recordset.
    >
    > What I would like to do is as follows:
    >
    > I have a fantasy hockey league website. For each team I
    have a team page
    > (clubhouse) which is generated using PHP/MySQL. The one
    area I would like
    > to
    > clean up is the displaying of the divisional standings
    on the right side.
    > As of
    > right now, I use a URL variable (division = id2) to grab
    the needed data,
    > which
    > works ok. What I want to do is clean up the url abit.
    >
    > So far the url is
    clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
    > all
    > I want is clubhouse.php?team=Wings.
    >
    > I have a separate table, that has the teams entire
    information (full team
    > name, short team, abbreviation, conference, division,
    etc. so I was
    > thinking if
    > I could somehow do this:
    >
    > Recordset Team Info is filtered using URL variable team
    (short team).
    > Based on
    > what team equals, it would then insert this variable
    into the Divisional
    > Standings recordset.
    >
    > So example: If I type in clubhouse.php?team=Wings, the
    Team Info recordset
    > would bring up the Pacific division. Then 'Pacific'
    would be inserted into
    > the
    > Divisional Standings recordset to display the Pacific
    Division Standings.
    >
    > Basically I want this
    >
    > SELECT *
    > FROM standings
    > WHERE division = <teaminfo.division>
    > ORDER BY pts DESC
    >
    > Could someone help me, thank you.
    >

  • A set from a set of sampled data from a thickness sensor.

    A  set from a set of sampled data from a thickness sensor.
    The samples are stored in an appropriate array of up to 100 elements.
    The values represent the depth of the insulation around a particular cable.
    The thickness can vary from 0-4mm represented by a corresponding real value
    stored in the array. as long as the depth is between 1 and 4 mm the cable
    falls within the allowable specification however if it falls below 1mm it is
    deemed to be too thin.
    Design a VI that will identify the number of thin values and display as a
    percentage of total number of samples.
    The front panel  have the must have the following:
    An array of controls holding the sampled values.
    An indicator holding the percentage of thin values.
    Attachments:
    Test Data 1.vi ‏14 KB

    hi there, this is Faddi, I am doing the same assignment as the one you poested earlier!! I know its a very basic one, but i need your help in doin the second task asap PLEASE!! IF you could please...its as follows:
    This is to be designed to work on a set of sampled data from a thickness sensor. The samples are stored in an appropriate array of up to 100 elements. The values represent the depth of the insulation around a particular cable. The thickness can vary from 0- 4 mm represented by a corresponding real value stored in the array. As long as the depth is between 1 and 4 mm the cable falls within the allowable specification however if it falls below 1 mm it is deemed to be too thin.  Specification 1
     To design a VI that will identify the number of thin values and display as a percentage of the total number of samples. The front panel must have the following:           An array of controls holding the sampled values.           An indicator holding the percentage of thin values.  Specification 2
     Thin values tend to appear as sections or patches along the length of the cable i.e. values of less than 1 mm stored in successive array elements. To design a VI that will meet specification 1 and will also calculate the number of these thin patches. The front panel will now have an extra indicator to display the number of patches.  
    Thankyou

  • Select records with in a given range

    Hi Team,
    I've very urgent requirement. I urge please help as soon as possible
    I've two table like below
    Subscriber Table
    SID Sub_StDate Sub_Enddate
    101 05-jan-2014 28-mar-2014---SET S1
    101 01-apr-2014 29-june-2014---- S2
    101 01-Aug-2014 14-dec-2014---S3
    102 01-jan-2014 31-aug-2014---S4
    Premium Table
    SID pre_StDate pre_Enddate
    101 01-jan-2014 28-feb-2014 --- SET P1
    101 01-mar-2014 30-july-2014 --- SET p2
    101 01-jul-2014 14-oct-2014----P3
    101 15-oct-2014 31-dec-2014---P4
    102 01-jan-2014 31-aug-2014 ---P5
    i need to split subcriber table date range by comparing with premium table date range and keep them in temp table
    i.e my temble should be
    SID Stdate enddate
    101 05-jan-2014 28-feb-2014
    101 01-mar-2014 28-mar-2014
    (mt S1 falls into P1 and P2 range)
    101 01-apr-2014 29-june-2014(s2 falls in P2only)
    101 01-aug-2014 14-oct-2014
    101 15-oct-2014 31-dec-2014
    (s3 falls in p3,p4)
    102 01-jan-2014 31-aug-2014(direct)
    That means i need to check my subscriber date range falls under which premium and i need to split time range accordingly for all subscribers. and my one more constraint is I have millions of records like this. If I use more loops,performance is getting down
    very badly.
    Please give optimized solution I've very less time to give it client. Please help. let me know still need more explanation on my requirement
    thanks in advance
    sundari
    Sundari

    Hi, sqlsaga beat me by few minutes and he did good job!
    The following code also in the same lines
    SELECT S.[SID] AS 'SUBSCRIBER SID' , S.[Sub_StDate], S.[Sub_Enddate],
    P.[SID] AS 'PREMIUM SID' , P.[pre_StDate], P.[pre_Enddate],
    S.[SUBSCRIBER], P.[PREMIUM]
    INTO #TEMP1
    FROM
    SELECT S1.[SID], S1.[Sub_StDate], S1.[Sub_Enddate], S1.[SUBSCRIBER]
    FROM
    SELECT 101 AS SID, CONVERT(DATE,'01/05/2014') AS Sub_StDate , CONVERT(DATE,'03/28/2014') AS Sub_Enddate, 'S1' AS SUBSCRIBER
    UNION ALL
    SELECT 101 AS SID, CONVERT(DATE,'04/01/2014') AS Sub_StDate , CONVERT(DATE,'06/29/2014') AS Sub_Enddate, 'S2' AS SUBSCRIBER
    UNION ALL
    SELECT 101 AS SID, CONVERT(DATE,'08/01/2014') AS Sub_StDate , CONVERT(DATE,'12/14/2014') AS Sub_Enddate, 'S3' AS SUBSCRIBER
    UNION ALL
    SELECT 102 AS SID, CONVERT(DATE,'01/01/2014') AS Sub_StDate , CONVERT(DATE,'08/31/2014') AS Sub_Enddate, 'S4' AS SUBSCRIBER
    ) AS S1
    Subscriber Table
    SID Sub_StDate Sub_Enddate
    101 05-jan-2014 28-mar-2014 ---SET S1
    101 01-apr-2014 29-june-2014 ---S2
    101 01-Aug-2014 14-dec-2014 ---S3
    102 01-jan-2014 31-aug-2014 ---S4
    ) AS S ---Subscriber Table
    OUTER APPLY
    SELECT P1.[SID], P1.[pre_StDate], P1.[pre_Enddate], P1.PREMIUM
    FROM
    SELECT 101 AS SID, CONVERT(DATE,'01/01/2014') AS pre_StDate , CONVERT(DATE,'02/28/2014') AS pre_Enddate, 'P1' AS PREMIUM
    UNION ALL
    SELECT 101 AS SID, CONVERT(DATE,'03/01/2014') AS pre_StDate , CONVERT(DATE,'07/30/2014') AS pre_Enddate, 'P2' AS PREMIUM
    UNION ALL
    SELECT 101 AS SID, CONVERT(DATE,'07/01/2014') AS pre_StDate , CONVERT(DATE,'10/14/2014') AS pre_Enddate, 'P3' AS PREMIUM
    UNION ALL
    SELECT 101 AS SID, CONVERT(DATE,'10/15/2014') AS pre_StDate , CONVERT(DATE,'12/31/2014') AS pre_Enddate, 'P4' AS PREMIUM
    UNION ALL
    SELECT 102 AS SID, CONVERT(DATE,'01/01/2014') AS pre_StDate , CONVERT(DATE,'08/31/2014') AS pre_Enddate, 'P5' AS PREMIUM
    ) AS P1
    WHERE (
    ( S. [SID] = P1.[SID] )
    AND
    ( S.[Sub_StDate] BETWEEN P1.[pre_StDate] AND P1.[pre_Enddate] )
    OR
    ( S.[Sub_Enddate] BETWEEN P1.[pre_StDate] AND P1.[pre_Enddate] )
    Premium Table
    SID pre_StDate pre_Enddate
    101 01-jan-2014 28-feb-2014 ---SET P1
    101 01-mar-2014 30-july-2014 ---P2
    101 01-jul-2014 14-oct-2014 ---P3
    101 15-oct-2014 31-dec-2014 ---P4
    102 01-jan-2014 31-aug-2014 ---P5
    ) AS P ---Premium Table

  • Multiple select queries used in Excel BI report ,fetching data from Sharepoint DB(SP2010_Prod_ProjectServer) causing blockage on DB ,when more than one workbook(same copy of Excel BI Report) refreshed using Refresh All option.

    I am using mutiple select queries to fetch data from Project Server 2010 DB(its sharepoint DB) and these queries fetch data in Excel BI report by establishing connection with DB using instance name and all. I have enhance all these select queries and data
    is being fetched in secs. but when more than one copy of same Excel BI report is refreshed using 'Refresh All' option, then these select queries cause blockage on DB.
    Please let me know mitigation for this blockage issue.
    Should I use begin transaction and commit transaction statements/ shared lock statements.
    please reply

    Hi,
    run same query at the same time?

  • Select query taking too much time to fetch data from pool table a005

    Dear all,
    I am using 2 pool table a005 and a006 in my program. I am using select query to fetch data from these table. i.e. example is mentioned below.
    select * from a005 into table t_a005 for all entries in it_itab
                       where vkorg in s_vkorg
                       and     matnr in  s_matnr
                       and     aplp   in  s_aplp
                       and     kmunh = it_itab-kmunh.
    here i can't create index also as tables are pool table...If there is any solutions , than please help me for same..
    Thanks ,

    it would be helpful to know what other fields are in the internal table you are using for the FOR ALL ENTRIES.
    In general, you should code the order of your fields in the select in the same order as they appear in the database.  If you do not have the top key field, then the entire database is read. If it's large then it's going to take a lot of time.  The more key fields from the beginning of the structure that you can supply at faster the retrieval.
    Regards,
    Brent

  • SELECT is taking lot of time to fetch data from cluster table BSET

    <Modified the subject line>
    Hi experts,
    I want to fetch data of some fields from bset table but it is taking a lot of time as the table is cluster table.
    Can you please suggest me any other process to fetch data from cluster table. I am using native sql to fetch data.
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 1:51 PM

    Hi Subhas,
    As per your suggestion I am now using normal SQL statement to select data from BSET but it is still taking much time.
    My SQL statement is :
    SELECT BELNR
                  GJAHR
                  BUZEI
                  MWSKZ
                  HWBAS
                  KSCHL
                  KNUMH FROM BSET INTO CORRESPONDING FIELDS OF TABLE IT_BSET
                  FOR ALL ENTRIES IN IT_BKPF
                  WHERE BELNR = IT_BKPF-BELNR
                      AND BUKRS = IT_BKPF-BUKRS.
    <Added code tags>
    Can you suggest me anymore?
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 4:16 PM

  • I would like to import my bookmarks from IE but the 'Import Data from Another Browser' is greyed out and not an available choice.

    By following the directions on Firefox to open up the Library tool - import & backup - The drop down choice to 'Import Data from another Browser' this choice is greyed out and unavailable. I do not know how to proceed in order to import my favorites from IE.

    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.com/kb/Private+Browsing
    To see all History and Cookie settings, choose:
    *Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Deselect: [ ] "Always use private browsing mode"

  • Srollpane scrolls when loaded data from XML, not when loaded data from ASP

    Hi,
    I load into scrollpane a swf, which has a dynamicly loaded
    data. If I use the XML file, it works (the scrollbar is visible),
    but if I use a asp file, which creates xml, it doesn't work (the
    scrollbar is not visible). Any ideas?

    Hi,
    let say I have a A.swf and a B.swf. In A.swf I have a
    scrollpane in to wich the B.swf is loaded. Below is the code in
    B.swf. If I load the data from a asp file, the scrollbar in the
    scrollpane is not visible, but if I use the xml file, the scrollbar
    is visible.
    What I've meant is that I think that Flash gets the same form
    of data, no matter if I use the asp or xml, because the asp creates
    the same xml form as I use in the xml file. I hope this makes any
    sense.

  • Number of a day occurence in a range of dates

    Hi
    I had a requirement of counting the number of times a particular day occurs between two dates.
    For eg., Tuesday comes 9 times betweeen '01-mar-2008' and '15-apr-2008'
    I have written the below function for it and it gives the desired output.
    But am looking for a better logic, may be directly getting the count through a query instead of a function.
    create or replace function day_occurance ( from_date date, to_date date) RETURN NUMBER is
       occ_day NUMBER := 3;
       from_weekday  NUMBER;
       ctr number := 0;
       temp_date date;
    begin
       temp_date := from_date;
       while (temp_date <= to_date) loop
          from_weekday := to_char(temp_date, 'd');
          IF (from_weekday = occ_day) THEN
            ctr := ctr + 1;
          END IF;
          temp_date := temp_date + 1;     
       end loop;
       return ctr;
    end;Thanks in advance.
    Piks
    null

    like this ?
    SQL> select count(*) from (
      2  select to_date('01-03-2008', 'DD-MM-YYYY') + rownum - 1 dt from dual
      3  connect by level <= to_date('15-04-2008', 'DD-MM-YYYY') - to_date('01-03-2008', 'DD-MM-YYYY') + 1)
      4  where trim(to_char(dt, 'DAY')) = 'TUESDAY' ;
      COUNT(*)
             7

  • Help please! How would i know if a day is within a range of dates?

    Hi everyone!
    I'm new to java. I just want to ask for help about date manipulation.
    My situation is this:
    In a given company, they set their own first-day-of-the-week. And this first-day-of-the-week may change from time to time. Given a calendar, you will pick a date and automatically, the start and end date of that certain week should be displayed in the text field. But the start and the end week should conform to what they set as the first-day-of-the week.
    Example:
    first_day_of_the_week = tuesday
    picked_date = april 7, 2005 //which is a thursday
    the output should be:
    start_date = april 5, 2005 //a tuesday
    end_date = april 11, 2005 // a monday
    because april 7 is within the week april 5 to april 11, april 5 being the first day of that week.
    I would really appreaciate if someone could help me.
    Thank you in advance!

    >
    Example:
    first_day_of_the_week = tuesday
    picked_date = april 7, 2005 //which is a
    thursday
    the output should be:
    start_date = april 5, 2005 //a tuesday
    end_date = april 11, 2005 // a monday
    because april 7 is within the week april 5 to april
    11, april 5 being the first day of that week.
    I would really appreaciate if someone could help me.
    Thank you in advance!Algorithm...
    - Set 'start' = to picked_date
    - Use Calendar and 'picked_date' to decrement by one day until day of week is tuesday.
    - Set 'start' to date in Calendar.
    - Use Calendar and ''picked_date'' to increment by one day until day of week is tuesday.
    - Decrement by one.
    - Set 'end' to date in Calendar.

  • How do I read a range of data from an open and "live" Excel file using LV7.0 Express

    I need to interface with software which continuously (once per second) writes a new array to a fixed location in an open Excel file. I would like to read this data into Labview from where I can do what I like with it. I am relatively new to LabView and have tried all "Read Data" examples that come with the product, Active examples seem very unclear. Anyone got any samples/suggestions to get me started?
    Attachments:
    Changing_Excel_file.xls ‏17 KB

    It is possible but might be a little bit complicated. Does your application opens the Excel file or Excel file was opened through Excel or another application already?
    In the first senario, once the excel is opened, start reading the data, do not close the report file (dispose the report) or close the excel file
    In the second senario, it is a little bit more complicated. You need to use low level Excel ActiveX functions. The procedure is:
    1. Open reference to Excel
    2. Activate the desired workbook if it is already opened
    or open a new file
    3. Activate the sheet containing the data
    4. Read the data
    5. Loop if necessary (step 2 if diff wb, step 3 if diff sht, 4 if same sheet)
    6. Close Excel reference (Very important, close the
    ref only, do not use Application.Exit to exit Excel).
    Hope this helps,
    -Joe

  • Cannot open Microsoft Office after copying it across from external HD with recovered data from my broken macbook HD.

    I have recently had to replace the hard drive in my macbook pro. All the data has been recovered from my old one onto an external HD and I have copied over everything from this onto the new HD on my macbook. Everything is fine except for Microsoft Office (2011).
    Although I can see all the Microsoft Office programs in the Applications folder, I can't open any of them. It sort of tries, but then doesn't open. All my word, excel, etc documents have the little 'W' or 'X' in the icon and I can preview them, but it won't open.
    So far I have copied Office and Messenger into Applications, 'Microsoft' into Application Support, 'Microsoft' into Preferences, and the 'Microsoft-Userdata' into Documents.
    Have I missed something? I don't have the original CD or product key anymore so don't think I can completely reinstall.
    Thanks.

    Thanks for your help - I have now found the original product key (although still no disc!)  so is there any way now? After this, I'm giving up and just biting the bullet and buying it again, annoying!

Maybe you are looking for

  • Usb Ethernet does not work

    After installing Mountain Lion on my MBA I cannot get my USBto Ethernet adaptor to work. I tried setting a manual ip and Router/DNS but it still says "not Connected"in my preference panel. I tried the usb adaptor on a an other device and it worked di

  • I bought the last apple wire keyboard , but it does not work with my usb ..

    i bought the last apple wire keyboard , but it does not work with my usb hub why ? the only way it works its when connecting it thrue my powerbook usb ... the problem is i HAVE TO USE IT THRUE AN USB HUB ... do you think its because my hub is cheap ?

  • Purchase order through E-mail

    Dear all, I have created one message condition type ZMAI copying from NEU for purchase order output and assigned output mode as 5-External send.Communication strategy i have given as CS01.Condition records i have maintained in MN04.My purchase orders

  • Multiple Forms in one Spool

    I have one program that generates a Smartforms and then it submit another program that prints another forms. Both programs use OPEN FORM to create it and those programs are called via SUBMIT command. The problem is that I tried to use the parameter "

  • Issue with Safety Upper limit for CALDAY Field for Generic Data Source

    Hi, I have given Upper limit as 1 for Calday field of one of the Generic Data Sources. I have got a doubt here.If today's load got failed and I will rerun the load next day.So Will that new run captures all 2 days records. Can any one advise me on th