```python
import csv
import io


def export_rows(rows):
    # rows: list of dict with keys 'name' and 'quantity'
    # 即使 rows 为空，也要输出表头
    output = [['name', 'quantity']]
    for row in rows:
        # 根据题设，输入总是包含这两个键
        output.append([row['name'], row['quantity']])
    # 将数据写入 CSV 字符串
    string_io = io.StringIO()
    writer = csv.writer(string_io)
    writer.writerows(output)
    return string_io.getvalue()


if __name__ == "__main__":
    print(export_rows([{"name": "笔记本, A5", "quantity": 2}, {"name": '卡片 "蓝色"', "quantity": 1}]))

```