Jump to content

jftuga

Active Members
  • Posts

    332
  • Joined

  • Last visited

Profile Information

  • Location
    Athens, GA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jftuga's Achievements

Universalist

Universalist (7/7)

1

Reputation

  1. func pie() Local $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 $oExcel.WorkBooks.Add $oExcel.ActiveWorkbook.Sheets(1).Select() $oExcel.Activesheet.Cells(1, 1).Value = "Answer" $oExcel.Activesheet.Cells(2, 1).Value = "Yes" $oExcel.Activesheet.Cells(3, 1).Value = "No" $oExcel.ActiveSheet.Columns(1).AutoFit $oExcel.Activesheet.Cells(1, 2).Value = "First Time" $oExcel.Activesheet.Cells(2, 2).Value = "52" $oExcel.Activesheet.Cells(3, 2).Value = "205" $oExcel.ActiveSheet.Columns(2).AutoFit ; Set the names of the worksheets $oExcel.ActiveSheet.Name = "_XLChart_Example" Local $XValueRange = "=_XLChart_Example!R2C1:R3C1" _XLChart_ChartCreate($oExcel, 1, $xl3DPie, "A9:D18", "", $XValueRange, "=_XLChart_Example!R2C2:R3C2", "=_XLChart_Example!B1", True, "First Time") endfunc pie() I studied _XLChart_Example() and made the example above, which works. R stands for row. C stands for column. Thanks, -John
  2. I think this format may be easier to work with, but am still working on the_XLChart_ChartCreate() parameters. _ExcelWriteCell($oExcel, "first visit", 1, 2) _ExcelWriteCell($oExcel, "yes", 2,1) _ExcelWriteCell($oExcel, "no", 3,1) _ExcelWriteArray($oExcel, 2, 2, $values, 1)
  3. I am trying to create a 3D Pie Chart, but can't figure out the arguments. I am at my wits end today. $oExcel = _ExcelBookNew(1) global $values[2] = ["52", "205"] _ExcelWriteCell($oExcel, "first visit", 2, 1) _ExcelWriteCell($oExcel, "yes", 1,2) _ExcelWriteCell($oExcel, "no", 1,3) _ExcelWriteArray($oExcel, 2, 2, $values, 0) local $oChart $oChart =_XLChart_ChartCreate($oExcel, 1, $xl3DPie, "A5:D10", ???, ???, "first visit") I am try to get this: What do I need to do? Every combination of function arguments I have tried has not worked. Thanks so much, -John
  4. I worked through this.
  5. $oChart =_XLChart_ChartCreate($oExcel,...) ; oChart is successful, and is displayed on the screen _XLChart_FontSet($oChart.Axes(2).AxisTitle, "Courier New", 14, True, False, False, -3) The _XLChart_FontSet() throws this error: This is occurring in a function. What is strange is that I have a separate program calling this same function (with different chart data) and it does not throw an error. It changes the font size and color. Any ideas? Thanks, -John The actual first command, which works, is this: $oChart =_XLChart_ChartCreate($oExcel, 1, $xlColumnClustered, "A" & $spacer & ":H" & $spacer+$chart_height, Default, "Tables!A" & $row & ":A" & ($row + $rating_count - 1), "Tables!B" & $row & ":B" & ($row + $rating_count - 1), "Total: " & $total, False, $question_chart, "Excellent + Very Good: " & $ex_vg_pct & "% (" & $ex_vg & " of " & $total & ")", "", $provider_or_clinic & @CR & $month, True)
  6. _XLChart_FillSet($oChart.SeriesCollection(1), -27) This did the trick. Thanks again water!
  7. water, Continuing on with the previous example, if I append this to the end: _XLChart_LineSet($oChart.SeriesCollection(1),3, -27) I will get this: What I really want is for the blue bar to be all yellow, not just an outline. How can I do this? Again, thanks for all of your help. I really do appreciate it. -John
  8. water, This is absolutely perfect! Thank you very much! -John
  9. I am having problems with $xlBarStacked with Excel 2010. #include <ExcelChart.au3> global $hdr[3] = [ "name", "returned", "sent" ] global $data[4][3] $data[0][0] = "john" $data[0][1] = "15" $data[0][2] = "129" $data[1][0] = "paul" $data[1][1] = "19" $data[1][2] = "79" $data[2][0] = "george" $data[2][1] = "21" $data[2][2] = "63" global $oExcel = _ExcelBookNew(1) _ExcelSheetNameSet($oExcel, "Charts") _ExcelWriteArray($oExcel, 1, 1, $hdr) global $i for $i=0 to 2 local $values[3] = [ $data[$i][0], $data[$i][1], $data[$i][2] ] _ExcelWriteArray($oExcel, $i+2, 1, $values) next local $oChart =_XLChart_ChartCreate($oExcel, "Charts", $xlBarStacked, "A6:E14", Default, "Charts!A2:A4", "Charts!C2:C4", "", False, "Return Rate", "", "", "", False) Desired output (notice the blue and the red): What the code actually outputs: What do I need to change in my code in order to get the stacked, multicolor bars in the graph? Thanks, -John
  10. Actually, this was a lot easier than I thought it would be. local $frame[13][7] local $new_frame[12][6] for $i=0 to 11 for $j=0 to 5 $new_frame[$i][$j] = $frame[$i+1][$j+1] next next _ArrayDisplay($new_frame)
  11. If you can't find an AutoIt solution, I solved this problem some time ago with another program. Here is the info: https://github.com/jftuga/Misc/tree/master/Finding_the_differences_between_two_similar_images -John
  12. I have an array that as an unused row and an unused column: row:0, col:0. How can I either delete these so that the '3' is at 0,0 or copy this into a new array where the '3' would be the first element. The 3 with the red circle is the first element needed. Everything in yellow is needed. White is not needed. Thanks, -John local $frame[13][7]
  13. water, Thanks for your help today. I really appreciate it! -John
  14. I am trying to change what is in the red circle. Axis(2) works, but 3 does not. Another question: where can I get a list of color and there corresponding numeric values. -John
  15. water, This works, except for $xlSeriesAxis. Working code: _XLChart_FontSet($oChart.Axes(2).AxisTitle, "Courier New", 20, True, False, False, -5) Which constant should I use? Also, thanks for your help! -John
×
×
  • Create New...