You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

如何在Excel中导入数据并制作基于X轴的多折线图(含6列不同行数数据处理方案)

Hey there! Let's break down your Excel questions step by step—this is totally doable, no need to stress.

1. Import Data and Create an X-axis-Based Multi-Line Chart

Common Ways to Import Data

  • From Text/CSV: Go to the Data tab → From Text/CSV, select your file, then follow the wizard to set delimiters (commas, tabs, etc.) and finish importing.
  • From Another Excel File: DataFrom FileFrom Workbook, pick the target file and choose the worksheet/range you want to import.
  • From External Data Sources (e.g., databases): DataFrom Other Sources, select the corresponding option and configure the connection settings.

Steps to Make the Multi-Line Chart

  1. Organize Your Data: Make sure your X-axis values (like dates, categories) are in one column, with your multiple series data in adjacent columns (even if row counts differ—we’ll fix that later).
  2. Insert the Line Chart: Select the range containing your X-axis and at least one series → Go to the Insert tab → Choose a Line Chart (I recommend Line Chart with Data Markers for clarity).
  3. Add More Series: If you only selected one series initially, right-click the chart → Select Data → Click Add under Legend Entries (Series). For each series, specify the Series Name (use the column header) and Series Values (the data range for that column). Ensure all series use the same Horizontal (Category) Axis Labels (your X-axis data range).
  4. Tweak X-axis Settings: Right-click the X-axis → Format Axis to adjust scale ranges, label positions, date/category formatting, etc. This ensures all lines align to the same X-axis.

2. Handle 6 Columns with Different Row Counts for a Multi-Line Chart

You don’t need any extra toolkits—Excel’s built-in features are all you need. The key is linking every series to a unified X-axis, even with mismatched row counts:

  • Step 1: Create a Unified X-axis Base: First, compile all possible X-axis values (e.g., all dates or categories across all 6 columns) into a single column. Make sure this column covers every X value present in any of your series.
  • Step 2: Align Series Data: Place each of your 6 data columns to the right of this unified X-axis column. Fill in data cells where they match an X-axis value, and leave cells blank where there’s no corresponding data (Excel automatically skips blank values, so your lines won’t break unnecessarily).
  • Step 3: Generate the Chart: Select the unified X-axis column plus all 6 data columns → Insert your line chart. Excel will automatically recognize each series and plot them against the same X-axis.
  • Alternative: Manually Add Series: If you don’t want to reorganize your data, right-click a blank chart → Select Data, then add each of the 6 series one by one:
    1. Click Add, then pick the column header for Series Name.
    2. Select the full data range for that column as Series Values.
    3. For all series, set Horizontal Axis Labels to your unified X-axis range (the base column you created earlier).

This will give you a multi-line chart matching your desired example, with each series plotted correctly against the shared X-axis.

内容的提问来源于stack exchange,提问作者amirandi

火山引擎 最新活动