如何使用公式复制和粘贴表格

时间:2020-07-03 19:55:28

标签: arrays google-sheets google-sheets-formula array-formulas

如果我将表格复制并粘贴到一个单元格中,则可以正常工作-以我将其放入的单元格开头创建表格。

但是我想用公式做到这一点。例如,我用### filledcurves and time data reset session $Data <<EOD 2020050500 34.92820 33.47148 69.01359 8.37408 36.82053 2020050501 34.14014 31.02070 68.22377 8.03866 35.97493 2020050502 32.93465 28.59794 66.69872 7.79872 34.76229 2020050503 31.56261 26.31655 64.97402 7.60045 33.42817 2020050504 29.55138 23.19680 61.65179 7.20578 31.10942 2020050505 28.45511 21.41614 60.70938 7.15501 29.97279 2020050506 28.78439 21.22073 63.38977 7.55193 30.63113 2020050507 28.32452 20.49873 64.72398 7.80252 30.85250 2020050508 25.49913 18.48231 60.84341 7.72398 29.33283 2020050509 19.03617 14.95413 49.02392 7.68153 23.93946 2020050510 14.25507 12.42948 39.15635 7.59906 19.45655 2020050511 11.56549 10.86627 33.26527 7.08790 16.58210 2020050512 10.40714 10.28374 30.64410 6.73005 15.23610 2020050513 9.99347 10.23459 30.32369 6.50979 15.00718 2020050514 9.77059 10.03319 30.06268 6.34308 14.90386 2020050515 9.46511 9.68426 28.68079 6.15453 14.22397 2020050516 9.12669 9.52622 27.02652 6.12770 13.46605 2020050517 8.94960 9.70764 26.01473 6.21285 12.75945 2020050518 8.30828 9.19368 23.64348 5.64860 11.42775 2020050519 6.98423 7.77228 19.39676 4.56069 9.39085 2020050520 5.81946 6.37644 15.79359 3.60976 7.73696 2020050521 5.36498 5.64128 14.26162 3.11704 7.00662 2020050522 5.18471 5.20392 13.71013 2.84699 6.70183 2020050523 4.96575 4.67512 13.20869 2.56693 6.34549 2020050600 4.80342 4.29339 12.99936 2.36875 6.11740 2020050601 4.57129 3.82130 12.45918 2.13018 5.80136 2020050602 4.62375 3.69038 12.84608 2.07090 5.95253 2020050603 4.89624 3.78565 13.95552 2.15729 6.42439 2020050604 5.11386 3.70182 14.69319 2.17235 6.70257 2020050605 5.32001 3.66094 15.21974 2.19411 6.86478 2020050606 5.51991 3.87873 15.74852 2.32875 7.07490 2020050607 5.67472 4.34660 16.24980 2.56207 7.47552 2020050608 7.11860 7.23675 22.40004 3.77179 10.82728 2020050609 7.91739 8.27180 24.90193 4.18627 12.04413 2020050610 8.40120 8.44643 25.63029 4.42067 12.51950 2020050611 8.78894 8.91031 26.46757 4.79258 13.22055 2020050612 8.75023 9.05808 25.82002 5.18174 13.31731 2020050613 8.69377 9.18953 25.18435 5.58854 13.35642 2020050614 8.67938 9.23050 24.79873 5.81155 13.34736 2020050615 8.61072 9.05110 24.20865 5.83554 13.13042 2020050616 8.61898 9.38255 24.24635 6.02599 13.15560 2020050617 9.88121 12.44088 28.35582 7.22637 15.13754 2020050618 13.03567 17.87587 35.27399 8.69368 18.69806 2020050619 17.21906 22.73761 41.73368 9.50554 22.38980 2020050620 22.06430 26.93686 48.36322 10.13785 26.27978 2020050621 27.02551 30.15065 54.72841 10.65425 30.01287 2020050622 29.04600 30.14368 57.09066 10.54669 31.39031 2020050623 28.72626 28.07003 56.50034 10.02480 30.99561 2020050700 28.97064 26.99266 57.29614 9.75325 31.34316 2020050701 29.37847 26.09241 57.38815 9.41128 31.39288 2020050702 29.04029 23.62373 54.13726 8.71631 29.70628 2020050703 26.91615 19.50575 47.41990 7.68835 26.01030 2020050704 22.78487 15.26919 39.35748 6.38515 21.32836 2020050705 15.26723 10.62037 27.09076 5.20689 14.57554 2020050706 8.87406 7.55900 17.58181 4.93560 9.53557 2020050707 6.11438 6.48395 14.25941 5.27410 7.86598 2020050708 4.67842 5.50418 12.43140 5.45161 7.09094 2020050709 3.64316 4.24208 10.22776 5.41426 6.11685 2020050710 3.17714 3.64387 8.92585 5.55745 5.67752 2020050711 3.20047 3.70725 8.78954 5.71015 5.83647 2020050712 3.50073 4.00986 9.26960 5.64515 6.21379 2020050713 3.59172 4.10384 9.19951 5.44214 6.23010 2020050714 3.32714 3.86352 8.31776 4.95656 5.70188 2020050715 2.92304 3.50896 7.19465 4.30262 4.96345 2020050716 2.61181 3.36959 6.41498 3.78693 4.42651 2020050717 2.77914 4.12923 6.82416 3.69544 4.57126 2020050718 4.21519 6.94777 9.53290 4.03701 6.17134 2020050719 6.95361 11.13112 14.64627 4.72538 9.09068 2020050720 10.43964 15.30013 21.20108 5.65491 12.65777 2020050721 13.85205 18.44100 27.72278 6.57799 16.04925 2020050722 16.65494 20.41442 33.30551 7.37484 18.98996 2020050723 18.98237 21.99487 38.32611 8.08933 21.69509 2020050800 21.45151 23.63957 42.98992 8.55449 24.35935 EOD set size 0.9,0.9 set size ratio 0.4 unset xlabel unset xtics set xtics nomirror norangelimit unset ylabel set ytics nomirror font ",11" set ytics 0,80,320 myTimeFmt = "%Y%m%d%H" set format x "%m/%d\n%H:%M" time set style data lines set style fill solid 1.00 noborder set style increment default myTime(col) = timecolumn(col,myTimeFmt) plot [][0:320] \ $Data u (myTime(1)):($2+$3+$4+$5+$6) w filledcu x1 lc rgb "#c77dff" t "Transportation", \ '' u (myTime(1)):($2+$3+$4+$5) w filledcu x1 t "Residential",\ '' u (myTime(1)):($2+$3+$4) w filledcu x1 lc rgb "#1982c4" t "Agriculture",\ '' u (myTime(1)):($2+$3) w filledcu x1 lc rgb "#8ac926" t "Industry",\ '' u (myTime(1)):($2) w filledcu x1 lc rgb "#EF476F" t "Power" ### end of code 填充单元格,但这不起作用-它仅填充左上角的单元格值,否则会输出错误。

所以我只需要工作=A1:B2

1 个答案:

答案 0 :(得分:2)

代替=A1:B2使用:

={A1:B2}

或:

=ARRAYFORMULA(A1:B2)