Forum Discussion

Subbulakshmi's avatar
Subbulakshmi
Frequent Contributor
12 years ago

Reading Chart Data/Graph from Excel

Hi,



I am reading data from Excel file for my automation script.

If the data is represented in graph/Chart format, how to read the same.

Please let us know the steps/Settings.

2 Replies

    • Bharadwaj's avatar
      Bharadwaj
      Contributor

      Hi Tanya,

      I have exactly the same requirement as this post. I have a scenario where I have to compare two excel files which have diagrams\graphs in them along with data. I am able to compare the data but not the charts. I can get the diagram count with the following code but unable to get the reference of the picture\diagram object which I can use in Test complete to compare. I have gone through all the links which you have mentioned in your previous reply but could not get an property which can actually solve my problem .Can you please help.

       if VarToInt(actualSheet.WorkSheet.Shapes.Count) <>  VarToInt(expectedSheet.WorkSheet.Shapes.Count)  then
              begin
                  Log.Error('There might be pictures that are either missing in actual or expected sheets,click on addtional information tab for details....',' Expected Sheet picture count : '+VarToStr(expectedSheet.WorkSheet.Shapes.Count)+#13#10 +
                  ' Actual Sheet picture count : '+VarToStr(actualSheet.WorkSheet.Shapes.Count)+#13#10  );            
              end;
              {end}