Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • issues with merging cell through putexcel command

    Hi,

    I am merging cell using the following commands through Stata. However, the A1:A2 cells are left unmerged when the do file completes. Here is the code.

    Code:
    // generate the excel sheet
    putexcel set "C:\abc\xyz\Analysis.xlsx",sheet(Analysis,replace) replace
    
    // Merge column
    putexcel (A1:A2), merge 
    putexcel (B1:B2), merge 
    putexcel (C1:C2),merge 
    putexcel (D1:F1),merge 
    putexcel (G1:I1),merge 
    putexcel (J1:L1),merge 
    putexcel (M1:Q1),merge 
    putexcel (R1:Y1),merge
    A picture of the merged cells is also given here.

    Can anyone guide me why A1:A2 are left unmerged, though it should have just like the other cells.

    Thank
    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	36.5 KB
ID:	1591988

  • #2
    Running the code you provide, I am unable to reproduce your problem: A1:A2 are merged in the spreadsheet it created.

    Comment


    • #3
      Originally posted by Ataullah Khan View Post
      Hi,

      I am merging cell using the following commands through Stata. However, the A1:A2 cells are left unmerged when the do file completes. Here is the code.

      Code:
      // generate the excel sheet
      putexcel set "C:\abc\xyz\Analysis.xlsx",sheet(Analysis,replace) replace
      
      // Merge column
      putexcel (A1:A2), merge
      putexcel (B1:B2), merge
      putexcel (C1:C2),merge
      putexcel (D1:F1),merge
      putexcel (G1:I1),merge
      putexcel (J1:L1),merge
      putexcel (M1:Q1),merge
      putexcel (R1:Y1),merge
      A picture of the merged cells is also given here.

      Can anyone guide me why A1:A2 are left unmerged, though it should have just like the other cells.

      Thank
      [ATTACH=CONFIG]n1591988[/ATTACH]
      I get the same output you did. Did you ever solve this?

      Comment

      Working...
      X