Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewStreamWriter set buffer流式写入的时候能否指定缓冲区 #1843

Open
pipi-king opened this issue Mar 12, 2024 · 3 comments
Open

Comments

@pipi-king
Copy link

pipi-king commented Mar 12, 2024

大佬 你好,想问下 流式写入的时候能否指定缓冲区,NewStreamWriter初始化的时候想类似csv这种csv.NewWriter(b),因为我的结构是这样的,想把流式的缓冲指定b
type newReaderWriter struct {
c chan [][]string
b *bytes.Buffer
w *excelize.StreamWriter
f *excelize.File
rowNumber int
sheet string
}

@peng
Copy link
Collaborator

peng commented Mar 12, 2024

你转换赋值过去应该就可以,使用问题建议加群讨论

@pipi-king
Copy link
Author

我在流式写完后,通过writeTobuffer写到我的缓冲区,但是这样就两套缓冲区啦,没啥意义,并且文件大容器内存会爆,能在初始化的时候制定缓冲区吗?
大佬说的转换赋值是什么意思?群在哪加啊

@peng
Copy link
Collaborator

peng commented Mar 12, 2024

https://xuri.me/excelize/zh-hans/ 中文文档首页 页面里有群的信息 在页面下半部分

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants