Can someone send same code in C sharp . I am in situation to compare two Excel filed in my project . It's very urgent . Appreciated in advance Thanks, Muhammad kamran
> On Sep 11, 2013, at 6:59 AM, Arunabh Ray <[email protected]> wrote: > > If you want to know which cells are different, this is the only way... > > but if you just want to know that if they are different then compare the file > sizes, if they are differ they will have different file sizes. > > The best thing would be to to compare the file sizes first, then the > individual cells. > > > >> On Wed, Sep 11, 2013 at 2:40 PM, Mary <[email protected]> wrote: >> I need to compare two excel files (each file has 20 sheets). >> I used the below code. But it is taking more than 1 hour to complete. Please >> share if any other way to compare excels. >> >> Set objExcel = CreateObject(“Excel.Application”) >> objExcel.Visible = True >> Set objWorkbook1= objExcel.Workbooks.Open(“Docs1.xls”) >> Set objWorkbook2= objExcel.Workbooks.Open(“Docs2.xls”) >> >> Set objWorksheet1= objWorkbook1.Worksheets(1) >> >> Set objWorksheet2= objWorkbook2.Worksheets(1) >> >> For Each cell In objWorksheet1.UsedRange >> If cell.Value <> objWorksheet2.Range(cell.Address).Value Then >> cell.Interior.ColorIndex = 3′Highlights in red color if any >> changes in cells >> Else >> cell.Interior.ColorIndex = 0 >> End If >> Next >> >> set objExcel=nothing >> -- >> -- >> You received this message because you are subscribed to the Google >> "QTP - HP Quick Test Professional - Automated Software Testing" >> group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/MercuryQTP?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "QTP - HP Quick Test Professional - Automated Software Testing" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > Regards > > Arunabh Ray > -- > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
