To address the challenges of spreadsheet programming, this paper presents TableTalk, a spreadsheet programming agent based on a large-scale language model. Implementing three design principles (scaffolding, flexibility, and incrementality) derived from a study of seven spreadsheet programmers and 85 Excel templates, TableTalk guides structured planning based on professional workflows and generates three potential next steps that allow programmers to tailor the plan to their needs. Using predefined tools, TableTalk generates spreadsheet components and builds spreadsheets incrementally. A study of 20 programmers demonstrated that TableTalk produced spreadsheets 2.3 times higher quality than baselines and reduced cognitive load and thinking time by 12.6%. This paper presents design guidelines for agent-based spreadsheet programming tools and discusses Takeaways for spreadsheet programming, end-user programming, AI-assisted programming, and human-agent collaboration.